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

Post Reply
vdegroote
Posts: 2
Joined: 06 Dec 2011, 21:52

Database access from EmailReporting plugin

Post by vdegroote »

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
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Database access from EmailReporting plugin

Post by SL-Gundam »

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
vdegroote
Posts: 2
Joined: 06 Dec 2011, 21:52

Re: Database access from EmailReporting plugin

Post by vdegroote »

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
Post Reply