Migrating to live server problem

Permalink
Hi,

I have migrated my concrete5 site from localhost(wamp) tohttp://www.ahhaweb.co.uk/broad/asap_test/...

here is my config file:

<?php
define('DB_SERVER', 'localhost');
define('DB_USERNAME', 'ahhablog156139');
define('DB_PASSWORD', 'UTvVw27PHZb6AcSN');
define('DB_DATABASE', 'ahhablog156139');
define('BASE_URL', 'http://www.ahhaweb.co.uk/broad/asap_test');
define('DIR_REL', '.');
define('PASSWORD_SALT', 'HDU1TCzgIFmjXUYFtGTwzPAQKYIaoVGDFsMBaDrxAr1jTuvaiQPpKSmujiDMbKys');
?>

My problem is i get the 'Unable to connect to database.
A database error occurred while processing this request.' message. (see attached), as far as i can see i have the config file setup correctly. I've looked through the forums and havent found a solution. Any help appreciated.

thanks

1 Attachment

 
Blenderite replied on at Permalink Reply
Blenderite
Ok this is really simple. All you have to do is go to your hosting provider and ask them what server name you should put down for their server.

Also, what type of server are you switching to? Linux or Windows based?

-Blenderite
ronyDdeveloper replied on at Permalink Reply
ronyDdeveloper
I think there is another way. If you are aware about phpmyadmin, then navigate into it through your server. And find the host name.

Rony
mhawke replied on at Permalink Best Answer Reply
mhawke
First, never put you real passwords in the forum. We don't need to know that to solve your problem and now there is a searchable, public record of your password. Everything a hacker would need.

When I run into this, it's most often because I spelled something wrong in the site.php so check that all the spelling is correct. It's case sensitive so make sure the case is correct as well.

It's very possible that the DB_SERVER is still 'localhost' but check it as ronyDdeveloper mentioned.
ahhaweb99 replied on at Permalink Reply
thanks guys, that sorted it sort of. any links i click on though dont seem to work, nor does the cms login page. have a look,http://www.ahhaweb.co.uk/broad/asap_test/...

I changed:
define('DIR_REL', '/broad/asap_test');
define('DB_SERVER', 'cust-mysql-123-04');
Blenderite replied on at Permalink Reply
Blenderite
What type of server did you transfer to, Linux or Windows?

If you went from Windows to Linux, there may be some databases that are named incorrectly.

-Blenderite
mhawke replied on at Permalink Reply
mhawke
Bad database names would crash long before this. Try putting this in your address bar:

http://www.ahhaweb.co.uk/broad/asap_test/index.php/dashboard/


and then if you get into the dashboard, go to 'Systems and Settings->Pretty URLs' and turn them off and back on again. Also clear your cache while you're in the dashboard.
ahhaweb99 replied on at Permalink Reply
HI, when i sign in i get: Not Found

The requested URL /asap/index.php was not found on this server.
ahhaweb99 replied on at Permalink Reply
hi, i couldnt get into the dashboard, but i emptied the page cache via FTP and then i could get into the dashboard. Turned pretty URLS on and off, and that solved the links problem. Thanks for helping me to resolve it!
mhawke replied on at Permalink Reply
mhawke
Great to hear. This is the number one problem when moving sites. Before moving as site, ALWAYS turn off Pretty URL's and clear the cache. I always delete all the files inside the '[root]/files/cache' folder so I don't even migrate them over.

If you don't mind, please pick an answer from above that was the most helpful. This way anyone wandering the forums searching for answers can quickly find a solution.
JohntheFish replied on at Permalink Reply
JohntheFish
Backup Voodoo creates a database backup with pretty url's already turned off and leaves the cache clear (it also sorts out table case if Maino's addon is also installed). :)