简体   繁体   中英

Apache2 internal server error not being logged

I'm doing some web development with the Laravel framework, and I have my jQuery set up so that it sends a request on click of a button to a PHP file, which then returns the result back to my jQuery.

However, every time I click this button I get an Internal Server Error. This is not the problem; rather the error is that my Apache error log does not make any mention of this 500 Internal Server Error. In fact, it doesn't really log anything except for [notice] caught SIGTERM, shutting down and [notice] Apache/2.2.22 (Debian) PHP/5.4.4-14+deb7u12 configured -- resuming normal operations . All that being said, my access.log shows the Internal Server Error happening:

"POST /testing/public/apps/devicecheckout-checkoutdevices HTTP/1.1" 500 833 " http://xxx.xxx.xxx.xxx/testing/public/apps/devicecheckout-checkoutdevices " "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.143 Safari/537.36"

In my php.ini file, I have error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT and log_errors = On .

How can I solve this problem?

Your script causes the apache process with PHP module to crash, as such it does not attempt to write anything to the logs and the parent process is the one logging all it knows: its child process caught SIGTERM.

I solved it by putting die("here") to different places to pinpoint where the crash happens, going deeper into code and all used libraries and frameworks. Then use your jugement to figure out what to do.

One thing I noticed that causes this a lot, is to print_r() a complex object with circular references.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM