How to start my server with PHP ?
#1

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 ?
Reply
#2

http://forum.sa-mp.com/index.php?topic=133781.0

Maybe that will help you.
Reply
#3

$aTemp = array();
proc_open('cd path/to/samp03; ./samp03svr &', array(), $aTemp);

Don't work
Reply
#4

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.
Reply
#5

Don't work too ...
Reply
#6

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...
Reply
#7

DON'T RUN SHARED SA-MP SERVERS AS APACHE!
Especially if you are a hosting company and selling them..
Reply
#8

Mmh... Why ?

With the panel of Westie, the start server work.
Reply
#9

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).
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: