I just switched hosts and I copied all the files over and the database but I'm getting warning messages.
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/megashop/public_html/includes/database.php on line 17
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/megashop/public_html/includes/database.php on line 21
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/megashop/public_html/includes/database.php on line 26
I still had the old database name, username and password in the config.php file.
Hi,
Did you try the code given in the above post in setup.php to display the MySQL error message? If not, can you give this a go and post the message you get...
Thanks,
David.
Hi,
This sounds like the database settings are not compatible with the new server. Can you check that the following variables in config.php have been updated if necessary:
$config_databaseServer
$config_databaseUsername
$config_databasePassword
$config_databaseName
Also, if you browse to setup.php again you will see the database tests which might help. The most likely cause is that the databaseServer is different, perhaps on a different machine on your new host rather than localhost....
If you're still getting the errors, I would suggest adding the following code to the end of setup.php:
<?php
print mysql_error();
?>
That will display the actual error message and should help diagnose the problem.
Cheers,
David.