wmachado Posted July 27, 2013 Share Posted July 27, 2013 Hi everybody, I am new at this forum and need a little help, I run several prestashop sites and I had to move from one server to the other and when I did this the website are not running anymore and I got server error 500, to rule out prestashop problems I fresh install a new prestashop site on my new server and got the same problem so I think that is server configuration problem, I will really appreciate if somebody could give a hint on this. My server is running Centos OS v 6.4 64 bit and last version of WHM cpanel Thank you Wagner Link to comment Share on other sites More sharing options...
PrestaCoder.com Posted July 27, 2013 Share Posted July 27, 2013 Hi, I think you should check your server error log or at least try to contact your hosting provider and try to ask them where is the problem. Link to comment Share on other sites More sharing options...
wmachado Posted July 27, 2013 Author Share Posted July 27, 2013 I recompile apache with mycript and the fresh install is now working but is not the same for the restored backups, and I have my on server Link to comment Share on other sites More sharing options...
NemoPS Posted July 27, 2013 Share Posted July 27, 2013 Hi, to troubleshoot try turning errors on as described in my signature, and post the error here if you get any Link to comment Share on other sites More sharing options...
wmachado Posted July 27, 2013 Author Share Posted July 27, 2013 Thanks, I already did that and found an error on a function calling mcrypt so I compiled the php and apache to include it and what happen is the fresh install starts to work perfect but the restored domains from the old server still experience the same problem but I believe now that the problem is related with the lack of memory in the server, I am running it in 1Gb and it is 87% taken before I try to load the website in the browser, the new fresh has only the sample data in the database but the restored domains has a lot of data, so I believe the problem resides on the memory Link to comment Share on other sites More sharing options...
wmachado Posted July 27, 2013 Author Share Posted July 27, 2013 anyway I had enable the error and got this: Fatal error: Uncaught exception 'SmartyException' with message 'unable to write file /home/levacom/public_html/cache/smarty/compile/10/67/c9/wrt51f39e48e703d2.15443950' in /home/levacom/public_html/tools/smarty/sysplugins/smarty_internal_write_file.php:44 Stack trace: #0 /home/levacom/public_html/tools/smarty/sysplugins/smarty_internal_template.php(201): Smarty_Internal_Write_File::writeFile('/home/levacom/p...', '<?php /* Smarty...', Object(Smarty)) #1 /home/levacom/public_html/tools/smarty/sysplugins/smarty_internal_templatebase.php(155): Smarty_Internal_Template->compileTemplateSource() #2 /home/levacom/public_html/tools/smarty/sysplugins/smarty_internal_templatebase.php(374): Smarty_Internal_TemplateBase->fetch('/home/levacom/p...', NULL, NULL, NULL, true) #3 /home/levacom/public_html/classes/controller/Controller.php(357): Smarty_Internal_TemplateBase->display('/home/levacom/p...') #4 /home/levacom/public_html/classes/controller/FrontController.php(582): ControllerCore->smartyOutputContent('/home/levacom/p...') #5 /h in /home/levacom/public_html/tools/smarty/sysplugins/smarty_internal_write_file.php on line 44 Link to comment Share on other sites More sharing options...
wmachado Posted July 27, 2013 Author Share Posted July 27, 2013 to be sure I had enable errors in two different domains and got the same result. Link to comment Share on other sites More sharing options...
NemoPS Posted July 27, 2013 Share Posted July 27, 2013 It means those folders don't have enough permissions, try setting them to 777 if they already are 755 Link to comment Share on other sites More sharing options...
wmachado Posted July 27, 2013 Author Share Posted July 27, 2013 nope all of them I have set to 777 and got the same error, those domains are working on the other server I just backup and restore in the new one and change the nameserver at the registar, all of them has the same error Link to comment Share on other sites More sharing options...
wmachado Posted July 27, 2013 Author Share Posted July 27, 2013 I still have my files installed in the old server and I have compared the files settings and they are the same. Link to comment Share on other sites More sharing options...
lancem Posted July 27, 2013 Share Posted July 27, 2013 Try setting the files and folders to 755. I got the same error when the permissions were set to 777. Specifically the problem was that the files/folders were group writeable. You can check the server log file to see if particular files or folders are specified. If you have cPanel then you can access it right from the cPanel admin page. Link to comment Share on other sites More sharing options...
wmachado Posted July 28, 2013 Author Share Posted July 28, 2013 Thank you but it is not the case I just sent the sites to the old server and they are working perfect, and I found that the whole problem is the short amount of memory on the new server, I ask the server provider to increase the memory that it will be done on monday, after that I will transfer the files back and see if the error 500 persist. I will post the results here. Link to comment Share on other sites More sharing options...
wmachado Posted July 30, 2013 Author Share Posted July 30, 2013 These are the results, for you that run your own server, if you run the server with cpanel, clamav, lfd/csf, mod_security first you have to have at least 2Gb of memory also you will need to set PHP 5 Handler to dso, if it is set to suphp it will not run loaded prestashop sites and it will give you server error 500. Server error 500 is a generic server error and it is difficult to identify if is prestashop error or server error, in my case it was server lack of memory and configuration. Thank you guys for all the inputs. Link to comment Share on other sites More sharing options...
tuk66 Posted July 30, 2013 Share Posted July 30, 2013 I think 1G of memory is more than enough for PrestaShop (if you haven't 1M products or other similar stuff). All is described here: unable to write file /home/levacom/public_html/cache/smarty/compile/10/67/c9/wrt51f39e48e703d2.15443950' It is definitely a permission issue. Link to comment Share on other sites More sharing options...
wmachado Posted July 30, 2013 Author Share Posted July 30, 2013 (edited) Yes, this is true, but you need to recompile PHP with some extensions like mcrypt and if you want to speed up the prestashop store you have to compile also mencache, so when you try to this using easyapache with only 1 Gb you got errors at the end of the process, I also open a ticket with cpanel and they inform that memory was not enough. Remember that 1G is not only for the site, you have to run OS plus Cpanel, Plus security, antivirus, you are dealing with a server and you have to harden it from the attackers etc..., that is the why I had to upgrade the memory. Now the server error 500 was in the php handler. Edited July 30, 2013 by wmachado (see edit history) Link to comment Share on other sites More sharing options...
wmachado Posted July 30, 2013 Author Share Posted July 30, 2013 also as I explain this site was running in my old server, I am just moving form one server to another, all the permissions were checked and they were the same as the server that the site was running good, so then I decided to look for the problem on the server and not on the prestashop itself, I think that prestashop error code was misinterpreted by the handler, now I have the site up and running Link to comment Share on other sites More sharing options...
Recommended Posts