Why does ngnix-php fail to GET the $ _ GET value?

Source: Internet
Author: User
Tags webp
There is no exception during development on the local machine, and there are various problems when deploying it to the server. the REQUEST_URI parameter clearly has a value, but QUERY_STRING is empty... orz uses apache for local development. is ngnix used for deployment related to configuration? {Code...} is not abnormal during local development. problems may occur when deployed on the server, REQUEST_URIBut QUERY_STRINGIt is empty... orz
Apache is used for local development. is ngnix used for deployment related to configuration?

array:32 [▼  "USER" => "www-data"  "HOME" => "/var/www"  "FCGI_ROLE" => "RESPONDER"  "QUERY_STRING" => ""  "REQUEST_METHOD" => "GET"  "CONTENT_TYPE" => ""  "CONTENT_LENGTH" => ""  "SCRIPT_FILENAME" => "/home/ubuntu/mfphp/index.php"  "SCRIPT_NAME" => "/index.php"  "REQUEST_URI" => "/Index/test/?id=3&page=1&size=10"  "DOCUMENT_URI" => "/index.php"  "DOCUMENT_ROOT" => "/home/ubuntu/mfphp"  "SERVER_PROTOCOL" => "HTTP/1.1"  "GATEWAY_INTERFACE" => "CGI/1.1"  "SERVER_SOFTWARE" => "nginx/1.4.6"  "REMOTE_ADDR" => "223.73.98.45"  "REMOTE_PORT" => "23487"  "SERVER_ADDR" => "10.104.44.175"  "SERVER_PORT" => "80"  "SERVER_NAME" => "gb.qiangtaoli.com"  "REDIRECT_STATUS" => "200"  "HTTP_HOST" => "gb.qiangtaoli.com"  "HTTP_CONNECTION" => "keep-alive"  "HTTP_CACHE_CONTROL" => "max-age=0"  "HTTP_UPGRADE_INSECURE_REQUESTS" => "1"  "HTTP_USER_AGENT" => "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36"  "HTTP_ACCEPT" => "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"  "HTTP_ACCEPT_ENCODING" => "gzip, deflate, sdch"  "HTTP_ACCEPT_LANGUAGE" => "zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4"  "PHP_SELF" => "/index.php"  "REQUEST_TIME_FLOAT" => 1472734757.8597  "REQUEST_TIME" => 1472734757]

Reply content:

There is no exception during development on the local machine. problems may occur when deployed on the server,REQUEST_URIButQUERY_STRINGIt is empty... orz
Apache is used for local development. is ngnix used for deployment related to configuration?

array:32 [▼  "USER" => "www-data"  "HOME" => "/var/www"  "FCGI_ROLE" => "RESPONDER"  "QUERY_STRING" => ""  "REQUEST_METHOD" => "GET"  "CONTENT_TYPE" => ""  "CONTENT_LENGTH" => ""  "SCRIPT_FILENAME" => "/home/ubuntu/mfphp/index.php"  "SCRIPT_NAME" => "/index.php"  "REQUEST_URI" => "/Index/test/?id=3&page=1&size=10"  "DOCUMENT_URI" => "/index.php"  "DOCUMENT_ROOT" => "/home/ubuntu/mfphp"  "SERVER_PROTOCOL" => "HTTP/1.1"  "GATEWAY_INTERFACE" => "CGI/1.1"  "SERVER_SOFTWARE" => "nginx/1.4.6"  "REMOTE_ADDR" => "223.73.98.45"  "REMOTE_PORT" => "23487"  "SERVER_ADDR" => "10.104.44.175"  "SERVER_PORT" => "80"  "SERVER_NAME" => "gb.qiangtaoli.com"  "REDIRECT_STATUS" => "200"  "HTTP_HOST" => "gb.qiangtaoli.com"  "HTTP_CONNECTION" => "keep-alive"  "HTTP_CACHE_CONTROL" => "max-age=0"  "HTTP_UPGRADE_INSECURE_REQUESTS" => "1"  "HTTP_USER_AGENT" => "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36"  "HTTP_ACCEPT" => "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"  "HTTP_ACCEPT_ENCODING" => "gzip, deflate, sdch"  "HTTP_ACCEPT_LANGUAGE" => "zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4"  "PHP_SELF" => "/index.php"  "REQUEST_TIME_FLOAT" => 1472734757.8597  "REQUEST_TIME" => 1472734757]

phpinfo();

Check whether value exists.

Check the value of variables_order in php. ini. Modify it to OK.

variables_order="EGPCS"

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.