Skip to main content

PHP-cgi断开问题

XXFPM 设置

F:/WAMP/xxfpm/bin/xxfpm.exe "F:/WAMP/php-7.3.6-Win32-VC15-x64/php-cgi.exe -c F:/WAMP/php-7.3.6-Win32-VC15-x64/php.ini" -n 5 -i 127.0.0.1 -p 9000
@cmd.exe

RunHiddenConsole 设置

start_nginx_php.bat

@echo off
set php_home=F:/WAMP/php-7.3.6-Win32-VC15-x64
set nginx_home=F:/WAMP/nginx-1.10.3


## REM Windows 下无效
REM set PHP_FCGI_CHILDREN=5

REM 每个进程处理的最大请求数,或设置为 Windows 环境变量
set PHP_FCGI_MAX_REQUESTS=1000

echo Starting PHP FastCGI...
F:/WAMP/RunHiddenConsole/RunHiddenConsole.exe %php_home%/php-cgi.exe -b 127.0.0.1:9000 -c %php_home%/php.ini
F:/WAMP/RunHiddenConsole/RunHiddenConsole.exe %php_home%/php-cgi.exe -b 127.0.0.1:9001 -c %php_home%/php.ini

echo Starting nginx...
F:/WAMP/RunHiddenConsole/RunHiddenConsole.exe %nginx_home%/nginx.exe -p %nginx_home%

stop_nginx_php.bat

@echo off
echo Stopping nginx...
taskkill /F /IM nginx.exe > nul
echo Stopping PHP FastCGI...
taskkill /F /IM php-cgi.exe > nul
exit