These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for AJAX POST results in Error 500, but no errors in logs on the new forum.
I have an AJAX contact form which when submitted, although the system sends the email, there is a 500 header returned so we cant show our success message. We use this AJAX form on soooo many sites, we dont understand the issue on this site.
If we disable Javascript and use a traditional POST from the contact form it works OK, its just when AJAX is used.
But the main issue is there are no errors in any error log. We've looked in both these logs and nothing is in there: /var/log/httpd/error_log /home/$user/logs/error_log
Are there any other places that store 500 error logs? Is there any reason why a 500 error log would not be logged?
Thanks
I discovered the error, although I dont know why it only occurred for AJAX...
A database table had crashed. Specifically one to do with a captcha field we use.
I found this out by enabling all error messages in the CMS we use (Expression Engine), so it output to the screen.
So my main concern is that this database error message is not recorded in an erorr log. We've spent a day on this. Is this because we use a CMS which has disabled error logging? Thing is, its still an INternal Server 500 error, so Apache knows there is an error, why hadn't it logged it?
Thanks
Howdy,
The error logs should be located in /home/USERNAME/logs/error_log.
If you aren't seeing any errors in there, you might consider changing the PHP Execution Mode to CGI for that domain to see if that helps.
If you still don't see an error at that point, it really might just be that the app isn't generating an error for some reason, though that tends to be pretty rare.
-Eric
No there are none in /home/USERNAME/logs/error_log, nor the main Apache log. I can only assume the application is preventing logging, even though its an internal 500 error. I thought all errors on the server, even 500 errors, would be logged, regardless of the application. Had to turn on all errors in the application to see it on screen (still not not logged into the error logs though).
At least I know to how to find them in the application, it just means users may see errors while I enable them.