Actions
Bug #20794
closedTYPO3 dies without an error message when the mysql-module for php is not loaded
Status:
Closed
Priority:
Should have
Assignee:
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2009-07-29
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
t3lib_db::sql_pconnect causes a "Fatal error: Call to undefined function mysql_pconnect() in /data/home/michaelk/TYPO3/typo3_src-trunk/t3lib/class.t3lib_db.php on line 949" when PHP doesn't support MySQL.
However, this error message is neither shown nor logged, as error messages are disabled (using the @-sign).
I provided a patch that shows a human-readable error-message instead.
(issue imported from #M11599)
Files
Updated by Andreas Wolf over 15 years ago
Michael, your solution works, but perhaps it's better to check if the mysql module is loaded. The effect is the same (as long as the PHP developers don't decide to remove mysql_connect()... ;)), but it just feels cleaner to me.
I changed your patch to conform to the CGL, the new version is attached.
Actions