PHP appears under fatal error 500

Source: Internet
Author: User
Tags php error php error log blank page
A while ago, the test server on the PHP version did an upgrade, and later in the development of debugging, access to find a blank page, after grabbing the packet found that HTTP code is 500, in PHP error log record a fatal error, can't help but a bit confused, because before the test machine, Even if the fatal error, there will be output on the page, HTTP code is 200, and should not be 500, so in the local test, found that this is true, then exactly why, the test server appears fatal error will return 500 HTTP code, and the local output error and return HTTP code 200?
Comparing the two configuration files, found that the test server above Display_error set to OFF, and the local display_error set to ON, then the answer is clear:
When Display_error is on, output error and return 200
When Display_error is off, no error is output and 500 is returned

The above describes PHP in the fatal error 500, including the content, I hope that the PHP tutorial interested in a friend helpful.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.