[wp-hackers] Blank screen during WP installation
Patrik Bóna
patrik.bona at mrhead.sk
Wed Nov 4 15:44:22 UTC 2009
Hi All,
Recently I was working on interesting problem. Wordpress installation
was failing when it was trying connect to the database. Problem was that
there was no error just blank screen.
I've tried to turn on error_reporting, but it did not help, so i started
to trace executed PHP files... After some time i've found that nothing
is executed after following line in wp-includes/wp-db.php:
$this->dbh = @mysql_connect($dbhost, $dbuser, $dbpassword, true);
So i've just removed @ and refreshed page and there was this error message:
Fatal error: mysql_connect() [<a
href='function.mysql-connect'>function.mysql-connect</a>]: Using mysql
has been disabled by admin. in
/domains1/do1840700/public/www_root/wp-includes/wp-db.php on line 341
So obviously problem was that mysql_connect was disabled (bad hosting),
no discussion here... ;)
But from my point of view this can be much bigger problem for people who
just want to try wordpress (on bad hosting) and after some clicks just
blank page is showed to them... Google also did not help me, so i don't
think that it can help to people who can not find problem themselves.
I know that mysql is prerequisite for WP, but why to not help people
with this.
Maybe solution which just came to my mind will be to check with
function_exists if mysql_connect is enabled somewhere during
installation process. What do you think ?
Best regards
Patrik
More information about the wp-hackers
mailing list