I'm in the process of changing web-servers, and having gone through all the requisite steps to move the drupal installation (dump the sql database, move all the files to the new FTP, change the settings.php file to reflect new database, move .htaccess) i'm confronted with a 'site off-line' message at the new site. (The old server is still up and the DNS hasn't been redirected; but the new server offers an access domain to preview the site before the DNS switch)

I have no idea what I'm doing wrong here. The changes to the settings.php file were correct, unless "localhost" is something that changes from host to host.

This is how the database string on settings.php reads:

$db_url = 'mysqli://s73403:27582758@localhost/db73403_1';
$db_prefix = '';

Anyone have any ideas about things I'm not thinking of?

Comments

russhull’s picture

Just noticed the error message on the page:

The mysqli error was: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2).

Anyone familiar with this error?

int’s picture

your drupal can't connect to MySQL. Make sure that you have installed mysql in localhost (the same machine that drupal). Make sure that MySQL is ON. Or one Firewall?

russhull’s picture

I realized what the initial problem was here - I had the database username and password wrong from the new host. Having corrected that, I run into a new problem. The current error message on the site reads:

'The mysqli error was: Unable to use the MySQLi database because the MySQLi extension for PHP is not installed. Check your php.ini to see how you can enable it..'

Doing a search on this error message brings up the solution of switching the php version from 4 to 5 (which it was indeed set to 4). But upon changing to version 5, I now have a blank white screen for my index.php rather than an error message.

Any ideas? I think perhaps my new host only supports MySQL and not MySQLi? However when I change the line in settings.php to reflect that (changed from $db_url = 'mysqli://db73403: ...' to '$db_url = 'mysql://db73403: ...'), I still just end up with a blank white screen.

siree’s picture

Hi,

I had the same problem. The important thing is to put your old site offline first BEFORE backing up the database.

Hope this helps.

gbaudoin’s picture

Status: Active » Closed (fixed)
sivachayanam’s picture

Version: 6.9 » 7.0
Priority: Normal » Major

Hi,

I am new to drupal... i was downloaded the drupal site & db from server. i was install into local. But In our local system when I was run that application, a blank page will displayed, and also i was changed the settings.php file also.

$db_url ='mysqli://root:@localhost/druapl123';
$db_prefix = '';

Can anybody help me please.

Thanks in advance...

Siva

kevinorin’s picture

'Site off-line' after server migration

This might work:
From phpMyAdmin or your database console/command line simply EMPTY all tables beginning with CACHE and also the WATCHDOG tables. Refresh and/or clear your browser cache and it may be ok.