Project

General

Profile

Actions

Bug #20794

closed

TYPO3 dies without an error message when the mysql-module for php is not loaded

Added by Michael Knabe over 15 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
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

class.t3lib_db.diff (626 Bytes) class.t3lib_db.diff Administrator Admin, 2009-07-29 20:24
0011599_v2.diff (795 Bytes) 0011599_v2.diff Administrator Admin, 2009-08-01 12:21
Actions #1

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 #2

Updated by Steffen Kamper about 15 years ago

committed v2 to trunk, rev 5878

Actions

Also available in: Atom PDF