How to start my server with PHP ? -
A-K-S - 09.04.2010
Hi,
I've just make that :
shell_exec(cd path/to/samp03)
shell_exec(./samp03svr)
But it doesn't work, my server don't start.
How can i launch my server ?
Re: How to start my server with PHP ? -
Burridge - 09.04.2010
http://forum.sa-mp.com/index.php?topic=133781.0
Maybe that will help you.
Re: How to start my server with PHP ? -
A-K-S - 09.04.2010
$aTemp = array();
proc_open('cd path/to/samp03; ./samp03svr &', array(), $aTemp);
Don't work
Re: How to start my server with PHP ? -
Westie - 09.04.2010
You need to immediately close that resource. It's the only way.
Код:
<?php
$aTemp = array();
proc_close(proc_open('cd path/to/samp03; nohup ./samp03svr &', array(), $aTemp));
Note there are better ways of doing it, not using any PHP execution functions.
Re: How to start my server with PHP ? -
A-K-S - 09.04.2010
Don't work too ...
Re: How to start my server with PHP ? -
A-K-S - 09.04.2010
I can start my server with your panel, Westie, but i can't determine how it's make.
Код:
function Run($sCommand)
{
$aTemp = array();
proc_close(proc_open($sCommand, array(), $aTemp));
return true;
}
function Start()
{
Run('cd path/to/myserver; nohup ./samp03svr1 2>&1 /dev/null &');
return true;
}
don't work too...
Re: How to start my server with PHP ? -
Woet - 09.04.2010
DON'T RUN SHARED SA-MP SERVERS AS APACHE!
Especially if you are a hosting company and selling them..
Re: How to start my server with PHP ? -
A-K-S - 09.04.2010
Mmh... Why ?
With the panel of Westie, the start server work.
Re: How to start my server with PHP ? -
Woet - 09.04.2010
Because it's extremely insecure.. any plugin will be able to wipe all the data of all SA-MP servers (and probably your panel too).
Re: How to start my server with PHP ? -
Westie - 09.04.2010
Quote:
Originally Posted by A-K-S
Mmh... Why ?
With the panel of Westie, the start server work.
|
If you don't know how to use it, don't use it.
Quote:
Originally Posted by Woet
Because it's extremely insecure.. any plugin will be able to wipe all the data of all SA-MP servers (and probably your panel too).
|
You also forgot to mention anything owned by www-data.