[wp-hackers] WorPress dies silently without MySQL PHP extention
Andrew Nacin
anacin at gwhatchet.com
Fri Dec 4 15:29:07 UTC 2009
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.
More information about the wp-hackers
mailing list