Details
-
Bug
-
Resolution: Fixed
-
Medium
-
3.8.7, 3.9.1, 3.9.1rc1
-
None
Description
If the PHP mysql extension is not loaded, the eZMySQLDB class does exit in its constructor when the function eZAppendWarningItem exists (web interface, defined in index.php), but not when that function does not exist, for example in cronjobs. So if the mysql extension is not loaded the runcronjobs script will fail with a fatal error, but you can't see why, even not in the debug output. mysql_connect will cause the fatal error because the function is not available, but it won't show the message due to the @ before the function call.
Proposed solution: besides using eZAppendWarningItem, the constructor should also write its error message to the debug output and always return wether eZAppendWarningItem exists or not.
On some distros different php.ini files are used for the webserver and the CLI, so this bug can cause you some serious headache if you don't know what's happening.