PHP start server? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Other (
https://sampforum.blast.hk/forumdisplay.php?fid=7)
+--- Forum: Everything and Nothing (
https://sampforum.blast.hk/forumdisplay.php?fid=23)
+--- Thread: PHP start server? (
/showthread.php?tid=269789)
PHP start server? -
DRIFT_HUNTER - 17.07.2011
Im trying to make a server control commands so you can start/stop server from where ever you want but i cant :/
can anyone post how i can start/stop server using php?
my server path is F:\Server\samp-server.exe
Re: PHP start server? -
Mrkrabz - 17.07.2011
string exec ( string $command [, array &$output [, int &$return_var ]] )
Edit: for example, exec("C:\sampsvr\samp-server.exe");
Re: PHP start server? -
DRIFT_HUNTER - 18.07.2011
Quote:
Originally Posted by Mrkrabz
string exec ( string $command [, array &$output [, int &$return_var ]] )
Edit: for example, exec("C:\sampsvr\samp-server.exe");
|
Dont work i tried it
Re: PHP start server? -
Mrkrabz - 18.07.2011
Quote:
Originally Posted by DRIFT_HUNTER
Dont work i tried it
|
Then you are doing it wrong
Re: PHP start server? -
Abbott - 18.07.2011
dont use exec on windows
evr
learn SSH (linux), it's cheaper and more affective.
Re: PHP start server? -
DRIFT_HUNTER - 18.07.2011
Quote:
Originally Posted by Abbott
dont use exec on windows
evr
learn SSH (linux), it's cheaper and more affective.
|
The reason why i using exec is cos i using windows and windows dont have ssh or ssh2
Its a nightmare to get it working
Re: PHP start server? -
Westie - 19.07.2011
I don't use exec() for starting anything.
Ever.
It hangs.
For Linux, I use a combination of proc_open and proc_close, and for Windows I use the WshShell COM object.