DWQA QuestionsCategory: ServerThe php-cgi.exe process exits automatically
Young master piaoyue asked 2 months ago

Configure nginx + PHP running environment under Windows Server, and the php-cgi.exe process will exit automatically when the server runs for a period of time? How do you configure the server?,Win32 + nginx + PHP automatically hang up php-cgi.exe

RunHiddenConsole E:/wnmp/php5/php-cgi.exe -b 127.0.0.1:9000 -c "E:/wnmp/php5/php.ini"

Step 1: Download xxfpm, the address will not be provided. Baidu search, there are many.

Download it

Step 2: create a new text and write the following code.
RunHiddenConsole.exe H:/Server_Core/xxfpm/bin/xxfpm.exe “H:/Server_Core/PHP/php-cgi.exe -c H:/Server_Core/PHP/php.ini” -n 2 -i 127.0.0.1 -p 9000
Explain:
Runhiddenconsole.exe is a window hiding tool, because if you don’t use it, the CMD window will be open all the time. If you close the window, the process will exit. Ho ho, you don’t need it, so you also need to download it. Put runhiddenconsole.exe and php-cgi.bat in your PHP root directory
2 in the above code refers to opening two php-cgi.exe processes. The specific situation is according to your own requirements, but it is not recommended to open one process. The specific reasons will be updated in the blog in the future. In addition, we will talk about load balancing later. At that time, 2 will be changed to 1.
The above code 9000 refers to PHP transmitting through port 9000
Warm tip: the slash in the code should use “/” instead of “”. Replace the path in the code with your actual configuration path, yunyun.
OK, after saving, change the TXT text to php-cgi.bat, save it, and then click, ha ha, the process is running stably…,Post a log to have a look,upstream timed out (10060: A connection attempt

3 Answers
Young master piaoyue answered 2 months ago

Win32 + nginx + PHP automatically hang up php-cgi.exe

RunHiddenConsole E:/wnmp/php5/php-cgi.exe -b 127.0.0.1:9000 -c "E:/wnmp/php5/php.ini"

Step 1: Download xxfpm, the address will not be provided. Baidu search, there are many.

Download it

Step 2: create a new text and write the following code.
RunHiddenConsole.exe H:/Server_Core/xxfpm/bin/xxfpm.exe “H:/Server_Core/PHP/php-cgi.exe -c H:/Server_Core/PHP/php.ini” -n 2 -i 127.0.0.1 -p 9000
Explain:
Runhiddenconsole.exe is a window hiding tool, because if you don’t use it, the CMD window will be open all the time. If you close the window, the process will exit. Ho ho, you don’t need it, so you also need to download it. Put runhiddenconsole.exe and php-cgi.bat in your PHP root directory
2 in the above code refers to opening two php-cgi.exe processes. The specific situation is according to your own requirements, but it is not recommended to open one process. The specific reasons will be updated in the blog in the future. In addition, we will talk about load balancing later. At that time, 2 will be changed to 1.
The above code 9000 refers to PHP transmitting through port 9000
Warm tip: the slash in the code should use “/” instead of “”. Replace the path in the code with your actual configuration path, yunyun.
OK, after saving, change the TXT text to php-cgi.bat, save it, and then click, ha ha, the process is running stably…

richard_ma answered 2 months ago

Post a log to have a look

petty thief ² º ¹ ⒍ answered 2 months ago

upstream timed out (10060: A connection attempt