Database access from EmailReporting plugin

This plugin allows you to report an issue in MantisBT by sending an email to a particular mail account

Moderators: Developer, Contributor

Database access from EmailReporting plugin

Postby vdegroote » Dec 06, 2011 5:03 pm

Hello,

I try to install/use the plugin. When I run the bug_report_mail.php script from the command line, I receive the following error:

Database connection failed. Error received from database was #0: PHP Support for database is not enabled.

Mantis bt access to the database (postgres) works correctly.
Is there something specific to do for EmailReporting ?

Could someone explain me the problem, and help me resolve it ?

Thank you
Vincent
vdegroote
 
Posts: 2
Joined: Dec 06, 2011 4:52 pm

Re: Database access from EmailReporting plugin

Postby SL-Gundam » Dec 07, 2011 1:57 pm

The difference is in the php thats used

You probbably specified somewhere in your webserver (for example Apache or IIS) where the php.ini can be found.

Since bug_report_mail does not run through a webserver but rather through the cli sapi (for example php.exe on windows) it cannot find the proper php.ini and therefore does not load required extensions like mysql, mysqli, postgres, sql server or other database extensions available

i suggest you investigate your php installation and the location for your php.ini
SL-Gundam
 
Posts: 139
Joined: Jul 06, 2011 9:17 am

Re: Database access from EmailReporting plugin

Postby vdegroote » Dec 07, 2011 5:39 pm

You're right.

The php working under apache was compiled and installed in a specific directory, accessible under apache.

But the php i was using when i tried to launch my command was the php installed in /usr/bin/php.
And this one was not compiled with database support.

Thank you for your help

Vincent
vdegroote
 
Posts: 2
Joined: Dec 06, 2011 4:52 pm


Return to EmailReporting

Who is online

Users browsing this forum: No registered users and 1 guest