geostant Posted July 28, 2013 Share Posted July 28, 2013 Again... Presta fail on my server I'm starting to lose it... The website encountered an error while retrieving http://www.domain.com/shop/psadmin/index.php?controller=admincarriers&submitAddcarrier=1&token=3caf997f84215c874ae59919afd4e3fc. It may be down for maintenance or configured incorrectly. Reload this webpage. Press the reload button to resubmit the data needed to load the page. Error code: 500 Link to comment Share on other sites More sharing options...
vekia Posted July 29, 2013 Share Posted July 29, 2013 if you've got internal server error, turn on error reporting, just follow instructions here or here after that you will see the error logs, then please paste the error code here, it will be really helpful in debug process Link to comment Share on other sites More sharing options...
geostant Posted July 29, 2013 Author Share Posted July 29, 2013 This IS the 500 error message debug is already on This is what it gave me as shown above while trying to update carrier settings Link to comment Share on other sites More sharing options...
swsindonesia Posted July 29, 2013 Share Posted July 29, 2013 Hi, a 500 error message might be fired by your web server (Apache) upon severe error that wasn't handled or caught by the PHP script. Apache however, store a handful of information within its error_log file when the incident occurs. Please check your apache error_log file, depends on your server configuration (self-hosted or external hosting), there are cases where PS breaks some of PHP limitation such as memory limit / max input vars that may result in this 500 server error. Share your server hosting type, we might be able to guide you in finding the error_log Link to comment Share on other sites More sharing options...
geostant Posted July 29, 2013 Author Share Posted July 29, 2013 On the management panel of my hosting it says "DirectAdmin" http://www.site-helper.com/ Does it help ? Link to comment Share on other sites More sharing options...
geostant Posted July 29, 2013 Author Share Posted July 29, 2013 I found a link on the admin panel that says logs, I've 2 options there : Apache usage log Apache error log I'm pasting here the error log : Mon Jul 29 09:25:55 2013] [error] [client 80.179.xxx.xxx] File does not exist: /home/domain/domains/domain.com/public_html/404.shtml [Mon Jul 29 09:27:08 2013] [error] [client 109.64.xxx.xxx] ModSecurity: Rule 1e5a238 [id "2106"][file "/etc/httpd/conf/modsecurity2/spd_modsec2.conf"][line "353"] - Execution error - PCRE limits exceeded (-8): (null). [hostname "www.domain.com"] [uri "/shop/psadmin/index.php"] [unique_id "UfYLO1Cy@oMAACQnRDcAAAAE"] [Mon Jul 29 09:27:12 2013] [error] [client 109.64.xxx.xxx] PHP Warning: file_put_contents(/home/domain/domains/domain.com/public_html/shop/config/xml/default_country_modules_list.xml): failed to open stream: Permission denied in /home/domain/domains/domain.com/public_html/shop/controllers/admin/AdminHomeController.php on line 670, referer: http://www.domain.com/shop/psadmin/index.php?controller=adminproducts&conf=4&token=0fa3e45bc64a4ff48b494565f73f1ccb [Mon Jul 29 09:27:51 2013] [error] [client 109.64.xxx.xxx] PHP Warning: file_put_contents(/home/domain/domains/domain.com/public_html/shop/config/xml/default_country_modules_list.xml): failed to open stream: Permission denied in /home/domain/domains/domain.com/public_html/shop/controllers/admin/AdminHomeController.php on line 670, referer: http://www.domain.com/shop/psadmin/index.php?controller=AdminSearch&token=1257a1faf249b867d5aa79c065847010 [Mon Jul 29 09:27:58 2013] [error] [client 109.64.xxx.xxx] PHP Warning: file_put_contents(/home/domain/domains/domain.com/public_html/shop/config/xml/default_country_modules_list.xml): failed to open stream: Permission denied in /home/domain/domains/domain.com/public_html/shop/controllers/admin/AdminHomeController.php on line 670, referer: http://www.domain.com/shop/psadmin/index.php?controller=AdminProducts&id_product=25&updateproduct&token=0fa3e45bc64a4ff48b494565f73f1ccb [Mon Jul 29 09:28:28 2013] [error] [client 109.64.xxx.xxx] ModSecurity: Rule 1e5a238 [id "2106"][file "/etc/httpd/conf/modsecurity2/spd_modsec2.conf"][line "353"] - Execution error - PCRE limits exceeded (-8): (null). [hostname "www.domain.com"] [uri "/shop/psadmin/index.php"] [unique_id "UfYLi1Cy@oMAADhrRmcAAAAJ"] [Mon Jul 29 09:28:32 2013] [error] [client 109.64.xxx.xxx] PHP Warning: file_put_contents(/home/domain/domains/domain.com/public_html/shop/config/xml/default_country_modules_list.xml): failed to open stream: Permission denied in /home/domain/domains/domain.com/public_html/shop/controllers/admin/AdminHomeController.php on line 670, referer: http://www.domain.com/shop/psadmin/index.php?controller=adminproducts&conf=4&token=0fa3e45bc64a4ff48b494565f73f1ccb [Mon Jul 29 09:31:27 2013] [error] [client 109.64.xxx.xxx] PHP Warning: file_put_contents(/home/domain/domains/domain.com/public_html/shop/config/xml/default_country_modules_list.xml): failed to open stream: Permission denied in /home/domain/domains/domain.com/public_html/shop/controllers/admin/AdminHomeController.php on line 670 [Mon Jul 29 09:31:29 2013] [error] [client 109.64.xxx.xxx] PHP Warning: file_put_contents(/home/domain/domains/domain.com/public_html/shop/config/xml/default_country_modules_list.xml): failed to open stream: Permission denied in /home/domain/domains/domain.com/public_html/shop/controllers/admin/AdminHomeController.php on line 670, referer: http://www.domain.com/shop/psadmin/ [Mon Jul 29 09:31:30 2013] [error] [client 109.64.xxx.xxx] PHP Warning: file_put_contents(/home/domain/domains/domain.com/public_html/shop/config/xml/default_country_modules_list.xml): failed to open stream: Permission denied in /home/domain/domains/domain.com/public_html/shop/controllers/admin/AdminHomeController.php on line 670, referer: http://www.domain.com/shop/psadmin/ Link to comment Share on other sites More sharing options...
vekia Posted July 29, 2013 Share Posted July 29, 2013 okay so the warnings that you've got are not the main problem in case of 500 server error. It's probably related to: Execution error - PCRE limits exceeded It's usually related to the server configuration problem, in this case - you have to configure it well (or your hoster) 1) Login to the server as a root user from shell.2) Go to directory cd /usr/local/apache/conf 3) Create a new file touch pcre_modsecurity_exceeded_limits.conf 4) Add the following contents by editing the above file using any editor like vi SecPcreMatchLimit 150000 SecPcreMatchLimitRecursion 150000 5) Change the permission of the file to 600 chmod 600 /usr/local/apache/conf/pcre_modsecurity_exceeded_limits.conf 6) Open the mod_security file containing rules /usr/local/apache/conf/modsec2.user.conf 7) Locate the line <IfModule mod_security2.c> 8 ) Add the below line above the line located at setp 7 and save the file. Include “/usr/local/apache/conf/pcre_modsecurity_exceeded_limits.conf” 9) Make a configuration test before restarting Apache service /etc/init.d/httpd configtest 10) If there is no syntax then restart Apache service 1 Link to comment Share on other sites More sharing options...
swsindonesia Posted July 29, 2013 Share Posted July 29, 2013 Or you can try setting the PS config folder to 755 just before you update the carrier settings, and change back to 644 after you're done. 1 Link to comment Share on other sites More sharing options...
geostant Posted August 1, 2013 Author Share Posted August 1, 2013 Hello again, My host have tried to fix the issue but could not he even tried to disable completely the mod_security just for test but it still give the same problem. It only occur to me while I'm trying to update carriers on my back-office now it give me an error that favicon.ico is missing as well has 404.shtml so I've uploaded a dummy files with the same names (blank) to the place where the system is searching for them but still same results. Obviously they have no influence on server performance but still... had to try Any suggestions ? I must find a way to fix it. I would have delete the shop and re-enter my products back to the database but there are hundreds of products and there is no way to export them on my version 1.5.2.0 Link to comment Share on other sites More sharing options...
geostant Posted August 1, 2013 Author Share Posted August 1, 2013 Or you can try setting the PS config folder to 755 just before you update the carrier settings, and change back to 644 after you're done. I've tried that and the folder is already on 755 when I change it to 644 I get a new error and I've no access to the back office. Link to comment Share on other sites More sharing options...
benjamin utterback Posted August 1, 2013 Share Posted August 1, 2013 I've tried that and the folder is already on 755 when I change it to 644 I get a new error and I've no access to the back office. That is strange that your host could not fix it when based on the error logs it's clearly a server/permissions error. You tried 755... I would probably never really suggest this but you could try 777 for the folder and files, it's open to everyone at that point so make sure to just test it to see if it allows you access. Then switch it back immediately. Link to comment Share on other sites More sharing options...
geostant Posted August 5, 2013 Author Share Posted August 5, 2013 Unfortunatelly still no, I see 777 to all the config folder and files and sub-folders but it give a server error (not mod_security). On the Apache log file I don't have any line which indicate the error ! Link to comment Share on other sites More sharing options...
vekia Posted August 5, 2013 Share Posted August 5, 2013 apache log usually contains the logs related to the 404 error etc. (many of hosters disable the php error logs) the questions is: what about PHP error log (not apache) ? have you got an access to PHP error logs? Link to comment Share on other sites More sharing options...
geostant Posted August 5, 2013 Author Share Posted August 5, 2013 (edited) It might be that error ? [Mon Aug 05 18:04:03 2013] [error] [client 62.0.200.xxx] PHP Warning: file_put_contents(/home/domain/domains/domain.ocm/public_html/shop/config/xml/default_country_modules_list.xml): failed to open stream: Permission denied in /home/domain/domains/domain.com/public_html/shop/controllers/admin/AdminHomeController.php on line 670, referer: http://www.domain.com/shop/psadmin/index.php?controller=admincarriers&id_carrier=38&updatecarrier&token=3caf997f84215c874ae59919afd4e3fc The permission of controllers folder was 777 I've changed it and all subs to 755 Still no change Edited August 5, 2013 by geostant (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted August 5, 2013 Share Posted August 5, 2013 no, it shouldn't affect your website Link to comment Share on other sites More sharing options...
geostant Posted August 5, 2013 Author Share Posted August 5, 2013 This is the error that I get it happens only during a try to update my shipping carriers otherwise I haven't got that same error elsewhere. Another issue that I find is that from time to time my shop lose all the CSS design I see the shop live but in text mode or something without any graphics. Maybe I should upload all the shop again to the server ? (1.5.2.0) Link to comment Share on other sites More sharing options...
Recommended Posts