When configuring the nginx+php operating environment under a windows server, the php-cgi.exe process will automatically exit after the server has been running for a period of time? Could you please tell me how to configure the server?
win32+nginx+php automatically hangs 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 is not provided, search on Baidu, there are many.
Downloaded
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
Explanation:
RunHiddenConsole.exe is a window hiding tool, because if you don’t use this, the CMD window will always be open. If you close the window, the process will exit. Oh, there is no such thing, so this You also need to download it, and put the RunHiddenConsole.exe and php-cgi.bat in your PHP root directory. The 2 in the above code refers to opening two php-cgi.exe processes. The specific situation is based on your own requirements. Yes, but it is not recommended to open a process. The specific reasons will be updated in a future blog. In addition, we will talk about load balancing in the future. At that time, the 2 will be changed to 1.
The code 9000 above refers to PHP transmission through port 9000
Warm reminder: The slash in the code must use "/" instead of "". Replace the path in the code with your actual configuration path, and so on.
OK, after saving, rename the TXT text to php-cgi.bat, save it, and click it again, haha, the process is running stably. . .