markjl Posted September 21, 2012 Share Posted September 21, 2012 Hello I'm getting rather too many internal server 500 errors than I would like. They are happening at different and varied times on just clicking a CMS or product link. What is generally the cause of this and what can I do about it? Thanks Link to comment Share on other sites More sharing options...
vekia Posted September 21, 2012 Share Posted September 21, 2012 Hello I'm getting rather too many internal server 500 errors than I would like. They are happening at different and varied times on just clicking a CMS or product link. What is generally the cause of this and what can I do about it? Thanks turn on displaying errors in configuration file and if you can catch the errors. Maybe you have access to log files in your server? You can find out there where the problem exists Link to comment Share on other sites More sharing options...
markjl Posted September 21, 2012 Author Share Posted September 21, 2012 How can I turn on this logging? What is the config file I need to change? Thanks Link to comment Share on other sites More sharing options...
markjl Posted September 24, 2012 Author Share Posted September 24, 2012 Hello. How can I turn on error logging to find out why I have server 500 errors? Thanks Link to comment Share on other sites More sharing options...
benjamin utterback Posted September 24, 2012 Share Posted September 24, 2012 Hello markjl, thank you for the message. You can turn on the Error log by going into your files via FTP, navigate to config>config.inc.php and the first code line will be @ini_set('display_errors', 'off');" . You can edit that line to say 'on' Link to comment Share on other sites More sharing options...
markjl Posted September 24, 2012 Author Share Posted September 24, 2012 (edited) Thanks, done that. If an error occurs, will it be recorded to a log then? Thanks Edited September 24, 2012 by markjl (see edit history) Link to comment Share on other sites More sharing options...
benjamin utterback Posted September 24, 2012 Share Posted September 24, 2012 Hello, if you are not sure how to view your servers error log, then it is best to contact your hosting provider for specific information. Thank you for choosing PrestaShop! Link to comment Share on other sites More sharing options...
phrasespot Posted September 24, 2012 Share Posted September 24, 2012 Thanks, done that. If an error occurs, will it be recorded to a log then? Thanks Note the name of the setting you are changing: display_errors. Errors occuring likely to display. It may not (e.g. if it is a bad .htaccess file), then conatct your hosting provider for the location of server error log as Benjamin suggested. They will be recorded there. Link to comment Share on other sites More sharing options...
markjl Posted September 24, 2012 Author Share Posted September 24, 2012 OK I found an error log in my cpanel. Here's an example [Mon Sep 24 16:47:55 2012] [error] [client myip] File does not exist: /home/ipcas/public_html/mjlvideo.fr/500.shtml, referer: http://mjlvideo.fr/fr/commande but it doesn't give much info (replaced my ip by myip) Link to comment Share on other sites More sharing options...
markjl Posted September 24, 2012 Author Share Posted September 24, 2012 There is also a raw access log but not sure if that can be of use. Herewith an extract - [24/Sep/2012:14:12:42 +0200] "GET /en/robots.txt HTTP/1.1" 301 20 "-" "Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)" 180.76.5.67 - - [24/Sep/2012:14:12:43 +0200] "GET /fr/page-non-trouvee HTTP/1.1" 404 7459 "-" "Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)" Link to comment Share on other sites More sharing options...
benjamin utterback Posted September 24, 2012 Share Posted September 24, 2012 Hello markjl, is there a baidu spider module installed on your PrestaShop? Link to comment Share on other sites More sharing options...
phrasespot Posted September 24, 2012 Share Posted September 24, 2012 (edited) OK I found an error log in my cpanel. [Mon Sep 24 16:47:55 2012] [error] [client myip] File does not exist: /home/ipcas/public_html/mjlvideo.fr/500.shtml, referer: http://mjlvideo.fr/fr/commande Your server is set the serve a custom error document, 500.shtml for 500 responses. A condition that causes 500 response to be served is occuring but the custom 500 document to be served is not being located. This error is different, and in addition to the condition causing the 500 error. Bad condition -> serve custom 500 document -> cannot find custom error doc -> raise file does not exist error There is also a raw access log but not sure if that can be of use. Herewith an extract - [24/Sep/2012:14:12:42 +0200] "GET /en/robots.txt HTTP/1.1" 301 20 "-" "Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)" Hello markjl, is there a baidu spider module installed on your PrestaShop? Sigh. Benjamin the log shows the successful response to a request of baidu spider visit. It is just a user agent string from the server logs common to every server log and unrelated to any errors. It is likely the case that the error log for your domain is separate from the main error log for the entire server. Contact your host and ask them to send a copy of error log. Edited September 24, 2012 by phrasespot (see edit history) Link to comment Share on other sites More sharing options...
benjamin utterback Posted September 24, 2012 Share Posted September 24, 2012 Hello phrasespot, thank you for the correction. I understand now. markjl, Sorry for the irrelevant post, as phrasespot mentioned, please call your hosting provider have them send a copy of the error log. We can then further assist you. Thank you, and thanks again phrasespot for the quick lesson. Regards, Benjamin Link to comment Share on other sites More sharing options...
markjl Posted September 25, 2012 Author Share Posted September 25, 2012 Hello. Thanks Benjamin and Phrasepot for your responses. I'm just trying to find out really what data I can use to trace the source of the internal server 500 error. Could there be something in the server logs (the raw access log is quite large) that would help or should I be looking elsewhere? Thanks. Link to comment Share on other sites More sharing options...
phrasespot Posted September 25, 2012 Share Posted September 25, 2012 the server logs (the raw access log is quite large) that would help or should I be looking elsewhere? Server access and errors are generally logged in separate files. So raw access logs in that case is unlikey to be any use. Find out where the errors are logged and look there for and hints. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now