Page 1 of 1
Posted: May 22, 2018 2:17 pm
I use Mantis on a PHP/SQL Server platform. This server also contains MySQL. I upgraded MySQL 8.0 and changed IIS to use PHP 7.1; I didn't think this would have mattered to Mantis. I'm now receiving APPLICATION ERROR #400
Database connection failed. Error received from database was #0: PHP Support for database is not enabled.
Currently at Mantis v2.6.0. It doesn't appear that upgrading to the latest version would make a difference. Any assistance is appreciated.
Posted: May 22, 2018 4:54 pm
I assume you have set $g_db_type to "mysql".
If so, change it to "mysqli" as the "mysql" driver is no longer supported in newer PHP version.
Independent from that, I recommend to upgrade Mantis to latest stable version, as 2.6.0 is quite outdated and comes with some major security issues.
Posted: May 23, 2018 5:16 pm
Thank you for your reply, I'm actually using SQL Server ($g_db_type = 'mssqlnative') so the upgrade of MySQL should not have affected Bug Tracker - yet this error is occurring. I'm wondering if there's anything related to PHP which would cause the issue. I plan to update, but I'd prefer updating when I have a stable environment if possible. Thank you.
Posted: May 24, 2018 2:21 am
changed IIS to use PHP 7.1
Database connection failed. Error received from database was #0: PHP Support for database is not enabled
Have you installed/enabled the appropriate driver (extension) in php? For recent releases:
Make sure the prerequisites are met too (ODBC Driver). If in doubt, follow the readme on github.
Posted: Oct 18, 2018 3:39 pm
I temporarily tabled this problem and went back to PHP 5.3. Now it's necessary for me to move to PHP7.1 and I still have this issue. I am "in Process" on upgrading to Mantis 2.18.
Here's an update.
My PHP/MySQL websites running under IIS (Server 2012R2) are fine. I'm having an issue with Mantis (PHP 7.1/SQLServer 2014SP2). I'm currently using php_pdo_sqlsrv.dll/php_sqlsrv.dll v5.3 under PHP v7.1 (all x86). I have ODBC Driver 17 (x86 and x64) installed on the server which should work. Mantis gives a Open Connect fail message when executing check/index.php with the following message: APPLICATION ERROR #400: Database connection failed. Error received from database was #0: SQLState: IM004 Error Code: 0 Message: [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed SQLState: IM004 Error Code: 0 Message: [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed.
Raised in file D:\InetPub\wwwroot\MantisBT\core\database_api.php on line 165
Any suggestions on my next course of action? Thank you!
Posted: Oct 19, 2018 3:00 am
Looks like a start up issue with SQL Server Agent. Please check
a) The SQL Server ERRORLOG and if present the SQLAgent.out file
b) The windows event log (both application and system), if there are any entries around the time your error occurred
That might reveal enough information about the exact cause of this issue.
Posted: Oct 22, 2018 6:12 pm
Thank you for your reply and your time. I was able to resolve the issue. Although the ODBC,SQL and Windows event logs didn't reveal anything, I was able to toggle between PHP versions and through this process, I found that my PHP SQL extension wasn't correct. I downloaded the proper version and it's working properly.