josepi wrote
just have to reload abyss
The idea is to have a .bat file which will stop the server and start it. This .bat file will be run from the script by using this sequence of commands:
<?php
echo 'The server is restarting';
flush();
ob_flush();
exec('start /B cmd.exe /C C:\\Full\\Path\\to\\restart.bat');
?>
C:\\Full\\Path\\to has to be replaced with the full path to restart.bat. Note that backslashes must be doubled because they have a special meaning in PHP strings.
Below you'll find two versions of the .bat file:
* If Abyss Web Server is running as a Windows Service:
restart.bat:
@echo off
net stop AbyssWebServer
net start AbyssWebServer
* If Abyss Web Server is running in a normal user session:
@echo off
C:\Path\to\abyssws.exe --stop
C:\Path\to\abyssws.exe
In the above script, replace C:\Path\to\ with the actual path where Abyss Web Server is installed.