Forum
Transferring website from localhost to staging server. Problem connecting to the...
I am trying to transfer my site from local host onto my staging site and I have encountered a problem. I have uploaded the sql database to phpMyAdmin on my server and have uploaded my website including the necessary perch files. I have also uploaded the perch compatibility test files. Using my server username, password, database and server information I tried out the perchtest and was successful. I put the same server info into the config.php file and now when I try to log in to perch on the website I get the following message;
"There's a problem with connecting to the database. Please check your settings. "
I am also getting these errors when I enter my username and password;
Warning: escapeshellcmd() has been disabled for security reasons in /home/jctonlin/public_html/perch/core/lib/PerchAuthenticatedUser.class.php on line 107
Warning: Cannot modify header information - headers already sent by (output started at /home/jctonlin/public_html/perch/core/lib/PerchAuthenticatedUser.class.php:107) in /home/jctonlin/public_html/perch/core/inc/auth.php on line 28
Warning: Cannot modify header information - headers already sent by (output started at /home/jctonlin/public_html/perch/core/lib/PerchAuthenticatedUser.class.php:107) in /home/jctonlin/public_html/perch/core/inc/auth.php on line 47
Warning: Cannot modify header information - headers already sent by (output started at /home/jctonlin/public_html/perch/core/lib/PerchAuthenticatedUser.class.php:107) in /home/jctonlin/public_html/perch/core/inc/top.php on line 15
Warning: Cannot modify header information - headers already sent by (output started at /home/jctonlin/public_html/perch/core/lib/PerchAuthenticatedUser.class.php:107) in /home/jctonlin/public_html/perch/core/inc/top.php on line 16
Any ideas on what the problem might be. Is it some information I am forgeting to enter or could it be to do with my server?
The
escapeshellcmd()
error is when Perch writes to your system log to report the failed login attempt. That shouldn't be an issue once you can connect to your database.If the details work for the compatibility test, they should work for Perch.
Well the compatibility tested did work but I still am encountering this error. Are there any settings I would need to configure in Perch or in the Database itself other than the config file? I had been using Perch with no problem on my local XAMPP server but this issue only appears when I uploaded to the staging server. I have also sent a ticket to my Server Host but I don't know if they will be able to help.
Usually if the test works the it's simply a copy and paste error with the details in the config file, so I would double check those. Otherwise you will need to speak to your host.
Got the problem fixed. The config file was the problem but not how I expected. It wasn't to do with the username, password, server or database but to do with the database prefix. The Database Prefix wasn't set to anything and once I set it to the correct prefix everything worked.