-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switched to php-cgi-spawner, better messages, minor code cleanup
- Loading branch information
Showing
8 changed files
with
69 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#user nobody; | ||
worker_processes 1; | ||
worker_processes 4; | ||
|
||
error_log logs/error.log warn; | ||
pid logs/nginx.pid; | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Put PHP 7 nts here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,33 @@ | ||
@IF [%1] == [] GOTO usage | ||
@echo off | ||
|
||
@taskkill /im php-cgi.exe /F > NUL | ||
@set PHP_FCGI_MAX_REQUESTS=0 | ||
@start "PHP %1 FastCGI" /B "%1\php-cgi.exe" -b localhost:9000 | ||
@echo Started PHP %1 FastCGI on port 9000. | ||
IF [%~1] == [] GOTO usage | ||
|
||
@GOTO :EOF | ||
if [%~2] == [] ( | ||
set cgi_port=9000 | ||
) else ( | ||
set cgi_port=%~2 | ||
) | ||
|
||
if [%~3] == [] ( | ||
set cgi_instances=4 | ||
) else ( | ||
set cgi_instances=%~3 | ||
) | ||
|
||
taskkill /im php-cgi-spawner.exe /F > NUL 2>&1 | ||
taskkill /im php-cgi.exe /F > NUL 2>&1 | ||
|
||
|
||
@rem set PHP_FCGI_MAX_REQUESTS=0 | ||
@rem start "PHP %1 FastCGI" /B "%1\php-cgi.exe" -b localhost:%cgi_port% | ||
|
||
start "PHP %1 FastCGI Spawner" /B "php-cgi-spawner.exe" %1/php-cgi.exe %cgi_port% %cgi_instances% | ||
|
||
echo Started %cgi_instances% PHP %1 FastCGI on port %cgi_port%. | ||
|
||
GOTO :EOF | ||
|
||
:usage | ||
@echo Kills existing php-cgi processes and then starts specified process from directory specified. | ||
@echo Usage is "restart_php php55" to start php-cgi from php55 directory. | ||
echo Kills existing php-cgi processes and then starts specified process from directory specified. | ||
echo Usage is "restart_php php55" to start php-cgi from php55 directory. | ||
echo You could also specify number of instances to spawn and a port to bind to "restart_php php55 4 9000". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
@call restart_php php55 | ||
@echo off | ||
|
||
@pushd nginx | ||
@start "nginx" /B "nginx.exe" | ||
@popd | ||
@echo Started nginx. | ||
call restart_php php7 | ||
|
||
@start "MariaDB" /B "mariadb\bin\mysqld.exe" "--defaults-file=mariadb\data\my.ini" | ||
@echo Started MariaDB. | ||
pushd nginx | ||
start "nginx" /B "nginx.exe" | ||
popd | ||
echo Started nginx. | ||
|
||
start "MariaDB" /B "mariadb\bin\mysqld.exe" "--defaults-file=mariadb\data\my.ini" | ||
echo Started MariaDB. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
@echo Killing php-cgi. | ||
@taskkill /im php-cgi.exe /F > NUL | ||
@echo off | ||
|
||
@echo Killing nginx. | ||
@taskkill /im nginx.exe /F > NUL | ||
echo Killing php-cgi spawner. | ||
taskkill /im php-cgi-spawner.exe /F > NUL 2>&1 | ||
|
||
@echo Stopping MariaDB. | ||
@mariadb\bin\mysqladmin -u root shutdown | ||
echo Killing php-cgi. | ||
taskkill /im php-cgi.exe /F > NUL 2>&1 | ||
|
||
echo Killing nginx. | ||
taskkill /im nginx.exe /F > NUL 2>&1 | ||
|
||
echo Stopping MariaDB. | ||
mariadb\bin\mysqladmin -u root shutdown |