2

I'm trying to set up a development folder for a Drupal6 already existing website.

Under htdocs/sites/<website>/settings.php I have the following line in order to connect to the drupal6 DB:

$db_url = 'mysql://root:<mysql_password>@localhost/<drupal_db_name>';

If I try to enter mysql using the same login data, I can do it without any problems, so I know this data is correct.

But I still keep getting the "Site off-line" message.

I've also tried using settings.php in the "default" folder under htdocs/sites/, but it didn't solve the problem.

Any suggestions of what could I try in order to fix or debug this?

UPDATE: I have not taken the site down through admin. I've taken the folder from a production server (where it's working correctly), and I've placed it into another server. I've also made the same thing with the DB.

3
  • 1
    Have you taken the site down through admin ?
    – GoodSp33d
    Aug 3, 2012 at 13:00
  • You said you placed it on another server. Did you also move your database? You're using @localhost, maybe you should use a different address? Also, what else does your site say besides site off-line? Something like "access denied"?
    – Mike
    Aug 3, 2012 at 14:51
  • It says access denied, but I don't think I should change @localhost to something else, because the DB is in that same server.
    – rfc1484
    Aug 6, 2012 at 14:44

1 Answer 1

2

You probably haven't installed and/or enabled the PHP MySQL extension (it's a requirement). You can check by creating a phpinfo() page and searching for 'mysql'. If it's not there, you need to install and enable it. You don't say what server you're using, but if it's Ubuntu or a similar Debian-based variant, you can do this:

$ sudo apt-get install php5-mysql
$ sudo /etc/init.d/apache2 restart

If you're on another platform, the steps will be a bit different, but you get the idea.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.