PHP + Nginx string content POST submit 502 error?

Source: Internet
Author: User
I made an inputname as title, a button, and wrote an echo $ _ POST [& #039; title & #039;] input & quot; newborn Series & quot; on the top; if you click the button for five characters, the system will not respond for a long time and the error 502 will occur. this problem will not occur for any other characters, for example, series of series _ series... I made an input name as title, a button, and an echo $ _ POST ['title'] on the top.

When you input the "newborn series" Five Characters in input, click the button for a long time without response and then the error 502 will not occur for any other characters, for example (newborn series _/series newborn/newborn series ),

But in some cases
For example, newborn series./newborn series! This string

What should I do? Database saving is not involved.

I am overwhelmed and I don't know how to troubleshoot it.

Reply content:

I made an input name as title, a button, and an echo $ _ POST ['title'] on the top.

When you input the "newborn series" Five Characters in input, click the button for a long time without response and then the error 502 will not occur for any other characters, for example (newborn series _/series newborn/newborn series ),

But in some cases
For example, newborn series./newborn series! This string

What should I do? Database saving is not involved.

I am overwhelmed and I don't know how to troubleshoot it.

First, regardless of the html input, make sure that your php can be correctly executed and write a php file separately.


  

Save the file as phpinfo. php and run it to check whether the information output can be seen;

The problem you encountered is not whether your code is correct. I feel that the problem lies in your php runtime environment.

You can print the POST value in the receiving program first. If the output is correct, the page also receives the data. as to why the 502 gateway error is reported, you need to check it step by step.

502 is nginx configuration incorrect?

We recommend that you check it! Nginx php-fpm configuration! Check the configuration of php-fpm! The two configurations have the same timeout and cache parameters!
To access php under nginx, you need to forward nginx to php-fpm! Php-fpm is being forwarded to php! There were exceptions in this process. Getway error!

502: fastcgi server does not return the correct response to the web server

  • Check if php-fpm is not up, or if the configuration is incorrect, whether it is listening to Port 9000 or unix domain socket.

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.