Page 1 of 1
HTTP error 500 on product/special
Posted: Sun Nov 03, 2019 10:24 pm
by jenniferergospel
Hi,
yesterday I noticed that my specials page isn't working anymore
https://www.ergospel.be/shop/index.php? ... ct/special... It gives a 500 error. Since this is not a page a look at every day, i realy have no idea how long it has been like this and therefore no clue where to start looking for the answer to why this happened. I have looked at the error log, but it doesn't show in there. All of my other pages seem to be working just fine.
Any clues on how to find out what causes it? Any logical reasons you can think of?
I am working on opencart 3.0.2.0 with journal theme.
With black friday coming up in a few weeks... I am in trouble.
Re: HTTP error 500 on product/special
Posted: Sun Nov 03, 2019 10:52 pm
by letxobnav
you would have to look at your error logs, not something we could deduce from the outside.
Re: HTTP error 500 on product/special
Posted: Sun Nov 03, 2019 11:00 pm
by jenniferergospel
Yes, that is what i did.
My question is, when the error log doesn't show the problem, is ther something else I can do or look at?
Re: HTTP error 500 on product/special
Posted: Sun Nov 03, 2019 11:02 pm
by letxobnav
you checked both OC error log (the one shown in admin, enabled?) and the regular php error log located on your server?
Re: HTTP error 500 on product/special
Posted: Sun Nov 03, 2019 11:04 pm
by conandrum
jenniferergospel wrote: ↑Sun Nov 03, 2019 11:00 pm
Yes, that is what i did.
My question is, when the error log doesn't show the problem, is ther something else I can do or look at?
Hi Jen,
Try adding this at the top of your index.php file.
Code: Select all
<?php
error_reporting(E_ALL);
ini_set("display_errors" , 1);
Remember to remove it when you are done debugging.
Re: HTTP error 500 on product/special
Posted: Sun Nov 03, 2019 11:06 pm
by thekrotek
Errors are always logged, you just looking in the wrong error log, that's all. Try to display errors on screen, which you can do without editing any PHP file. See this link on how to do it, "Displaying error messages" section:
https://thekrotek.com/support/reporting-issues
Re: HTTP error 500 on product/special
Posted: Sun Nov 03, 2019 11:20 pm
by jenniferergospel
My cpanel error log shows nothing, my amin error has several errors logged that I know of, but none that exist today.
I will try your suggestions.
Re: HTTP error 500 on product/special
Posted: Mon Nov 04, 2019 7:49 pm
by paulfeakins
thekrotek wrote: ↑Sun Nov 03, 2019 11:06 pm
Errors are always logged, you just looking in the wrong error log, that's all.
Oh dear Mr Krotek you know you shouldn't state something as fact unless you are 100% sure it is undisputedly true ... and even then be careful!
And you are wrong here, it is possible that a 500 Internal Server Error doesn't log anything to any of the main PHP or OpenCart logs if the error comes from the web server itself. You can test this by making a syntax error in your .htaccess and boom, 500 error, nothing in logs.
So although there is usually something in the logs 99% of the time, it is possible this one comes from .htaccess or something like mod_security if there really is nothing in any of the logs.
Re: HTTP error 500 on product/special
Posted: Mon Nov 04, 2019 8:20 pm
by thekrotek
paulfeakins wrote: ↑Mon Nov 04, 2019 7:49 pm
Oh dear Mr Krotek you know you shouldn't state something as fact unless you are 100% sure it is undisputedly true ... and even then be careful!
I always omit .htaccess errors, of course, because they're very rare. In most cases, like in 99.9% of them, people miss the main log, which is usually in the HOME directory, which is the parent directory for your store. There're usually at least 3 error logs out there and in the very, very, very rare cases your error isn't in one of them.
Re: HTTP error 500 on product/special
Posted: Mon Nov 04, 2019 8:27 pm
by paulfeakins
Yes you're right it is usually in one of the main logs.
It's possible mod_security is set to show a 500 error when it detects something suspicious (perhaps code injection) too.
Re: HTTP error 500 on product/special
Posted: Tue Nov 05, 2019 9:25 pm
by jenniferergospel
I got the problem solved. I contacted the devellopers from the most recent extension I bought some time ago and asked them to take a look, as it seemed like to most logical reason to me since I hadn't changed anything else myself... They managed to solve it.
Thank you for your input

Re: HTTP error 500 on product/special
Posted: Tue Nov 05, 2019 9:56 pm
by letxobnav
Errors are always logged
factual he is right, even htaccess errors are logged, just in the Apache error log itself.
Granted, most have no access to that but you could still ask your host.
And no sane person would deliberately set a 500 error in mod security.
Re: HTTP error 500 on product/special
Posted: Tue Nov 05, 2019 10:29 pm
by paulfeakins
letxobnav wrote: ↑Tue Nov 05, 2019 9:56 pm
Errors are always logged
factual he is right, even htaccess errors are logged, just in the Apache error log itself.
Granted, most have no access to that but you could still ask your host.
Not even factually I'm afraid, it's quite possible for an error not to be logged in any file anywhere depending on settings, so it's entirely possible there is no Apache log either.
letxobnav wrote: ↑Tue Nov 05, 2019 9:56 pm
And no sane person would deliberately set a 500 error in mod security.
Usually it's 404 but I've seen 500. The idea is to confuse the attempted hacker.
Re: HTTP error 500 on product/special
Posted: Tue Nov 05, 2019 11:03 pm
by letxobnav
Code: Select all
it's quite possible for an error not to be logged in any file anywhere depending on settings, so it's entirely possible there is no Apache log either.
Sure, in that context, if you turn off the web server the error logs will also be empty.
Code: Select all
Usually it's 404 but I've seen 500. The idea is to confuse the attempted hacker.
No, usually you drop the connection as a 404 still indicates there is a server there and a 500 even make it appear to be vulnerable.