Been building a 6.x site using the latest version. Everything is great on my localhost, however when I transfer the files and database to a live version I get 'Drupal Site Off-line'. It tells me to check the settings.php and whether the mysql server is running. The db_URL is pointing to the right place with correct priviledges. The mysql server is running too. What does the problem sound like to you? A configuration issue somewhere? Anyone got any ideas?

Comments

ujjwal.cms’s picture

please check mysql server, whether is it supporting mysqli or not?
if not please do the following change in settings.php file.
URL format: $db_url = 'mysql://username:password@localhost/databasename';

balajijana’s picture

hai,

please go through the following solutions:

First Solution:
1.first check the db_url in settings.php
2.Ensure that you have provided the correct database name.

Second solution:

1.Ensure you have uploaded all the files and no missing files.If so upload the missing files.

Third solution:

1.Go to admin side and under site-maintanence check the site-offline option is disabled.

Thanks

Balaji

Fixdit’s picture

1. db_url in settings.php is correct
2. No missing files
3. Can't get to admin side as it is either a white screen, or 'Site Offine' 'If you are the maintainer of this site, please check your database settings in the settings.php file and ensure that your hosting provider's database server is running.'

What does this sound like is happening, or not happening? Take a look: http://ngagedev.nitro-test.co.uk/

dman’s picture

The message means what is says.
To troubleshoot, you need to keep looking at where it says to look.

Is it really "localhost"? - most hosted servers use a different machine for their MySQL.
Can you log in to the database from the commandline on the server?
Just trying mysql -u USERNAME -pPASSWORD -h DBHOST DBNAME should demonstrate if you've really got it right.

Oh, and as a really interesting maybe:
don't use @ or : or / etc in your password

Fixdit’s picture

Cheers, I will check this and be straight back to you.

Fixdit’s picture

Not able to get commandline access at the moment, but should be finding out the if it really is localhost or not soon. I also tried the 'don't use @ or : or / etc in your password', but to no avail. I wonder, because if it was a settings.php $db_url issue, would it not say Access denied for user ‘blah’: (Using password: YES)? Let me know.

dman’s picture

No, that would count as exposing sensitive information to anonymous users.
As is normal in a security-conscious setup, the details of the authentication error are not public, but logged privately. It's expected that someone with admin rights can gain access to to real errors where they are logged on the server.
Simply knowing the database name, server name, and db user are each dangerous clues to would-be attackers.

sushil.R’s picture

Hi,

I m new to drupal, my site page showing the same thing " Site offline"

what to do, is restarting apache solve this issue , or is there is any cache issue

bala7284’s picture

hai,

please go through the following solutions:

First Solution:
1.first check the db_url in settings.php
2.Ensure that you have provided the correct database name.

Second solution:

1.Ensure you have uploaded all the files and no missing files.If so upload the missing files.

Third solution:

1.Go to admin side and under site-maintanence check the site-offline option is disabled.

Thanks

Balaji