Phpfastcgi problems, deadlocks, timeout

Source: Internet
Author: User
Phpfastcgi problem, deadlock, timeout my server environment is nginx, using fast-cgi method to parse php. $ Open_url & nbsp; = & nbsp; 'http: // 127.0.0.1: 82/test. php'; $ img_save_url & php fastcgi problem, deadlock, timeout
My server environment is nginx and uses the fast-cgi method to parse php.
$ Open_url = 'http: // 127.0.0.1: 82/test. php ';

$ Img_save_url = file_get_contents ($ open_url );
If the value is test.html, the local aspx page can also obtain the result. However, php reports the 504 gateway timeout error.
What causes this problem? Is cgi deadlocked?
The method used to start is: RunHiddenConsole.exe c: \ php \ php-cgi.exe-B 127.0.0.1: 9000-c: \ php. ini
------ Solution --------------------
In nginx and php-cgi modes, why do we have to get stuck in windows without using linux ......
------ Solution --------------------
Even a local virtual machine can be used.
------ Solution --------------------
$ Img_save_url = file_get_contents ($ open_url );
Allow_url_fopen = On
I wonder if you have set
------ Solution --------------------
Default llow_url_fopen = Off

You will never
Test. php
$open_url = 'http://127.0.0.1:82/test.php';
Right?
------ Solution --------------------
Can test.html directly run php statements?

Literacy
------ Solution --------------------
Paste your nginx. ini configuration file and run the fastcgi command in your command.
------ Solution --------------------
Reference:
Reference: can test.html directly run php statements?

Literacy
Do you understand?
I mean
$ Open_url = 'http: // 127.0.0.1: 82/test.html ';
$ Img_save_url = file_get_contents ($ open_url );
$ Img_save_url can obtain the returned value, indicating that it can be transferred to the website ......




Sorry

Understanding error

You can start service nginx start under the command

Or view the nginx error log.

Generally, this obvious error can be seen.
------ Solution --------------------
Reference:
The problem is solved. when two php-cgi.exe processes, one port is 9000 and the other port is 9001, no deadlock will occur. The two sub-websites use different processing methods:
Fastcgi_pass 127.0.0.1: 9000;
Fastcgi_pass 127.0.0.1: 9001;
The cause of the problem should be a deadlock in the process.
Do you need to configure multiple projects in the nginx. conf file for running?

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.