: This article mainly introduces php 500 in fatalerror. if you are interested in the PHP Tutorial, refer to it. Some time ago, the php version on the test server was upgraded. later, debugging was performed during development. During access, a blank page was found. after packet capture, the http code was 500, A fatal error is recorded in the php error log, which is a bit confusing, because in the previous test machine, even if it is a fatal error, there will be output on the page. The http code is 200, instead of 500, I did a local test and found that this was indeed the case. why is the fatal error on the test server returning the http code of 500, what happens if an error is returned locally and http code 200 is returned?
After comparing the two configuration files, it is found that display_error is set to off on the test server, and the local display_error is set to on, the answer is clear:
When display_error is on, an error is output and 200 is returned.
If display_error is off, no error is output and 500 is returned.
The above introduces the 500 error in php under fatal error, including some content, and hope to be helpful to friends who are interested in PHP tutorials.