Hello!

The title is pretty self explanatory of the problem.

I have tried these very nice written tutorial http://www.quinndombrowski.com/drupal/tutorials/troubleshooting-drupal-s...
to solve it, but no.
I have also checked my memory limit in php.in, it is 256MB, pretty ok I think.

Should be a module, from my point of understanding, how do I find which one?

Thanks!

Comments

hey_germano’s picture

It'll be a lot easier to solve this if you figure out what error is actually causing the WSOD.

This explains a few ways to get the error to show up: https://drupal.org/node/158043

mayiaba’s picture

So I edited my index.php to show my errors
and it seems like it doesn't connect to the database
Fatal error: require_once() [function.require]: Failed opening required '/mnt/target02/345332/787086/www.****.com/web/content/includes/database/mysqli/database.inc' (include_path='.:/usr/share/pear:/usr/share/php') in /mnt/target02/345332/787086/www.****.com/web/content/includes/database/database.inc on line 1685

my settings.php is edited like this

$databases = array (
'default' =>
array (
'default' =>
array (
'database' => '****',
'username' => '****',
'password' => '****',
'host' => 'localhost',
'port' => '',
'driver' => 'mysqli',
'prefix' => '',
),
),
);

What do I do wrong?

Thanks!

mayiaba’s picture

A small help, anyone?

hey_germano’s picture

It's hard to say what about the settings file isn't allowing the connection here, but I googled your error and found this post: https://drupal.org/node/475138

Maybe try switching the "mysqli" part to "mysql"?

mayiaba’s picture

Aha! Thanks HEY_GERMANO! We are getting closer!

I've changed mysqli and now I get this from Drupal!
Error

The website encountered an unexpected error. Please try again later.
Error messagePDOException: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in db_table_exists() (line 2761 of /mnt/target02/345332/787086/www.***.com/web/content/includes/database/database.inc).

Now any ideas?

hey_germano’s picture

I've gotten that error before. I don't know why, but it might help to replace 'localhost' with '127.0.0.1' in your settings file.

If that doesn't work, maybe check if MySQL is running at all. Can you access your database through phpMyAdmin? Do you have other sites that using the same MySQL server that are working? Try to figure out if it's an error specific to this Drupal config or MySQL in general. If it's MySQL in general, you might have to contact your hosting company.

mayiaba’s picture

Hi!

I did change localhost to 127.0.0.1 and then got a "Lost connection to MySQL server at 'reading initial communication packet'"

Then I found this post https://drupal.org/node/1315592 and changed my host, to my host ip and get a different error
" Site temporarily unavailable. Connection timed out - please try again."

How do I figure out exactly the kind of the problem?
I do have access to the database through phpMyAdmin. I don't have other sites that are using the same MySQL server.

Thanks!

mayiaba’s picture

Hello!

Could someone give his insight in this. I don't know how to fix this.

I have read this post and think that it could me something similar going on with my site.
https://drupal.org/node/1855156

Thanks!

Sam Moore’s picture

Can you copy the site in its current state to a local development environment? You may need to export your database at the command line using mysqldump, or from phpMyAdmin or something like that.
The first thing I'd look for is, can you get the site running locally? If so, you have something in the server environment that's blocking you.

Your settings.php needs to have something like this:
array (
'database' => '*****',
'username' => '*****',
'password' => '*****',
'host' => 'localhost',
'port' => '',
'driver' => 'mysql',
'prefix' => '',
),

So yours I think looks OK. You should leave the host as localhost, because your database may reject connections from any other host name or number, even if it's really "this machine". That's common in setting up user permissions on MySQL databases.

Now you have the problem that you can't connect to your database. Have you verified db name, username, password and port? Can you see the database via phpMyAdmin or something like that?

mayiaba’s picture

Hallo Sam and thank you for your support.

I have build the site locally, it is working fine here. Yes, I do have access to mysql.
I am just trying to go live now.

I have now my settings.php as
array (
'database' => '*****',
'username' => '*****',
'password' => '*****',
'host' => 'localhost',
'port' => '',
'driver' => 'mysql',
'prefix' => '',
),
and I get this error:

Error

The website encountered an unexpected error. Please try again later.
Error messagePDOException: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in db_table_exists() (line 2761 of /mnt/target02/345332/787086/www.***.com/web/content/includes/database/database.inc).

During the development, I think I have had a subtheme called mnt (see mnt included in the error path), but now the used sub theme is named otherwise.

Could this be it? Probably this is why it is not connecting to my database but have NO idea how to change this value!

Thanks again!

Sam Moore’s picture

the mnt token is probably referring to a mount point on the server's filesystem. I don't think that's likely to be an issue.

Perhaps your hosting provider would be helpful here? Seems like your MySQL connection is in fact the issue.
I'd explain to them that your config is fine, since it works locally, and you're having trouble connecting to the database. Or if you have access to mysql you may want to restart it...

mayiaba’s picture

Thank you Sam for your reply.

You are right about the "mnt".
I have contacted my hosting provider and wait for their help. :)