[wp-hackers] WorPress dies silently without MySQL PHP extention

Vlad GURDIGA gurdiga at gmail.com
Sat Dec 5 01:08:00 UTC 2009

On Fri, Dec 4, 2009 at 5:29 PM, Andrew Nacin <anacin at gwhatchet.com> wrote:
> When you don't have the MySQL extension called, wp-settings.php intercepts:
> if ( !extension_loaded
> <http://phpxref.ftwr.co.uk/wordpress/_functions/extension_loaded.html>('mysql')
> && !file_exists
> <http://phpxref.ftwr.co.uk/wordpress/_functions/file_exists.html>(WP_CONTENT_DIR
> <http://phpxref.ftwr.co.uk/wordpress/_constants/WP_CONTENT_DIR.html> .
> '/db.php') )    die( /*WP_I18N_OLD_MYSQL*/'Your PHP installation
> appears to be missing the MySQL extension which is required by
> WordPress.'/*/WP_I18N_OLD_MYSQL*/ );
> Note that check for wp-content/db.php -- that's what Otto referred to above:
>> To support another DB, you'd basically make your own db.php file in
>> the wp-content directory, then the wp-db.php never gets loaded.
> Scribu and Ozh already mentioned that if the mysql connection has a
> problem (like the next line after @mysql_connect), it'll die anyway
> with an error establishing the database connection. Thus, you're not
> supposed to get a straight-up blank screen.

Makes sense.

It was probably something wrong with my setup: it happened on Windows.

Thank you for the effort of explaining it and sorry for the noise.

More information about the wp-hackers mailing list