500 Error accessing PHP page under LNMP schema

Source: Internet
Author: User

By default, if the PHP script being accessed contains syntax errors, the server returns an empty "OK" page.

The Fastcgi.error_header option in PHP.ini allows an HTTP error code to be generated in this case so that the Web server can properly intercept and process this error code, similar to calling the header () in PHP code directly to return a 500 status code, such as header ("http/1.1 Internal Server Error");

Reconfigure: Set display_errors = on Turn On error display in php.ini, it's OK.

The above reference http://www.cnblogs.com/thrillerz/p/4725409.html

As the above operation, it is a syntax error to make the following changes:

PHP Version:5.5.9-1, os:ubuntu14.04

$data=$query->result_array () [0][' total '];//array size must be present and greater than 0

Switch

PHP version:5.3.28, Os:centos

            $data=$query-Result_array ();             if (isset($dataCount($data) >0) {                echo$data [0][' total '];            } {                echo ' 0 ';            

Suspect that this syntax is caused by the PHP version, to be available for later check.

500 Error accessing PHP page under LNMP schema

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.