Jump to content

Moving from Localhost to live site - 500 Error [SOLVED]


Recommended Posts

Hi All,

 

I have decided to put my prestashop live and test it and so began the process of porting from my localhost to my web hosting. I am with Fasthosts if anyone was wondering.

 

I am having a few problems though, see my process so far below:

 

- I made a backup of my database

- I made a copy of all files hosted on localhost in the /prestashop/ directory

- Restored the SQL database to my hosting: changing Domain/SSL Domain in the database to the website I am hosting it with "www.domainname.co.uk"

- I copied all the files, via FTP, to my hosting package in htdocs/prestashop/ directory

 

At this stage I got the message "A Link to the database could not be established".

 

- I opened my settings.inc.php and changed: define('_DB_SERVER_' from 'localhost' to the IP address assigned to my live MySQL database as well as the Username and Password (the database name is still the same).

 

When I try to access now by either www.domainname.co.uk/prestashop/ www.domainname.co.uk/prestashop/adminfolder I get the message:

"HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was

attempting to fulfil the request."

 

Any help getting this fixed would be amazing, I have messaged Fasthosts support but maybe someone has had this issue before or knows what the problem likely is.

 

If you need any more info, just ask.

 

Regards,

Bluebolt44

Edited by bluebolt44 (see edit history)
Link to comment
Share on other sites

I have checked this page prior to posting and I am sure the permissions are ok - I installed a fresh copy and there were no issues with Front or Back Office.

 

But having edited the css, layout and design etc. as well as imported almost 100 items with over 250 images I don't want to have to reimport due to major issues importing products/.csv the first time round and so this is why I want to migrate my existing store.

 

I doubt it's the server timeout issue as I can't even load either page and it happens immediately.

 

I do not have an .htaccess file in place, on my localhost or the live site. Is this a necessity? If so, can you let me know what it needs to contain and which folder/subdirectory it should be in?

 

I have messaged Fasthosts to ask them to direct me to the log so I can check what is causing the error so hopefully more info soon!

 

Thanks for your help,

Bluebolt44

Link to comment
Share on other sites

Installed the copy of Prestashop to a seperate Linux host we have to test it, same error but now I can access the log and this is what I have got:

 

[Wed May 30 11:36:23 2012] [error] [client 193.203.76.10] FastCGI: server "/var/www/fcgi/php-cgi" stderr: PHP Fatal error: Call to undefined function mcrypt_encrypt() in /home/fhlinux135/t/tx360.co.uk/user/htdocs/prestashop/classes/Rijndael.php on line 46

 

Looks like an issue to do with mcrypt not running on the servers (both windows and linux I would assume - something FastHosts doesn't have enabled).

 

 

I found a post regarding this issue and their solution worked for me also (See below):

 

http://www.prestasho...-remote-server/

 

It would appear that you've chosen the encryption method that requires mcrypt (or maybe this is now the default). I would change the record in the configuration table with name PS_CIPHER_ALGORITHM to '0'.

 

e.g. (assuming the DB_PREFIX is 'ps_') :

 

UPDATE `ps_configuration` SET `value` = '0' WHERE `name` = 'PS_CIPHER_ALGORITHM';

 

Paul

 

If I change this, I can access my store front and back but then if I change the encryption option to blowfish and re-run the SQL query to change PS_CIPHER_ALGORITHM back to 1, I cannot access the shop again with either encryption method selected.

 

My Question is: Is it secure, disabling the mcrypt cipher? And if not, what can I do (ask Fasthosts to change the php.ini?)

Edited by bluebolt44 (see edit history)
Link to comment
Share on other sites

I wouldn't recommend using these settings as I believe this is insecure and may pose a security threat.

 

My workaround is in the backoffice on your localhost, go into performance tab and change the encryption to CUSTOM BLOWFISH. Then if you export the DB and restore it on your remote server, everything should be fine =)

 

 

Marking this as Solved - More than happy to try and help if I can though with anyone having similar problems.

Link to comment
Share on other sites

  • 1 year later...
  • 8 months later...

I have upload project localhost to server but when i pass url page not redirect properly.

I have follow following steps:-

1>Change value of PS_SHOP_DOMAIN,PS_SHOP_DOMAIN_SSL.

2>Changed in settings.inc.php

3>Clear cache and cookies.

4>unset session and re login.

But problem is no t solved,if any help it will be appreciable.

Link to comment
Share on other sites

  • 2 weeks later...

Hello,

Thanks for reply, 

i have redirect home page(index page). Now problem is sort out because i have change the value of domain in table (remove "www." from domain value).

 

Regards

Milind  

Link to comment
Share on other sites

Hello,

Thanks for reply, 

i have redirect home page(index page). Now problem is sort out because i have change the value of domain in table (remove "www." from domain value).

 

Regards

Milind  

 

about what ps version you're talking?

are you able to manage shop in back office?

Link to comment
Share on other sites

×
×
  • Create New...