500 false revelations from PHP Nginx

Source: Internet
Author: User
Tags php script php syntax error

Now in a program, passed a session_id after the return Nginx 500 error. Passing another session_id will not be an error, and will not be known until debug mode is turned on. Because PHP syntax error, and in PHP.ini closed the display_error, and in the program to close the error message, so directly returned 500 error to nginx.

This parsing is in the PHP-FPM documentation:

If the php script being accessed contains a syntax error, and Display_errors is set to false, and there is no further setting, it returns "http/1.0 Internal Server Error" immediately. If you need to set an error code that is different from 500 (already used in many cases). Or if you want to make this behavior independent of the display_errors settings, you can use Fastcgi.error_header. If you use php-5.2.5 or above and php-fpm at the same time, the priority of the Fastcgi.error_header is higher.

This problem is resolved by finding the problem after you turn on debug mode.

Here are some revelations: some problems seem to occur in a module, and its origin may be related to modules in that module. In the event of this problem, we must trace the source and break it!

500 false revelations from PHP Nginx

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.