Cannont start samp-server by PHP (Win) -
bruunosoniico - 31.01.2011
Hi everyone, today i tried to start the samp-server by php. I tried:
exec("C:\sampsvr\samp-server.exe");
exec("C:\sampsvr\samp-server.exe + server.cfg");
exec("start C:\sampsvr\samp-server.exe");
exec("cd C:\sampsvr + start samp-server.exe");
exec("cd C:\sampsvr + start samp-server.exe + start server.cfg");
exec("cd C:\sampsvr & start samp-server.exe"); // It execute the server but the page will not load
Of course i made a little script to find the problem giving and output. I got this:
----------
Loaded log file: "server_log.txt".
----------
SA-MP Dedicated Server
----------------------
v0.3c, ©2005-2010 SA-MP Team
Unable to exec file 'server.cfg'.
Error: Your password must be changed from the default password, please change it.
I suppose that the samp-server.exe needs a parameter to be executed with the server.cfg, or something like that.
Can somebody help me?
Thanks, Bruno.
Re: Cannont start samp-server by PHP (Win) -
Voldemort - 31.01.2011
open server.cfg and rcon_password
CHANGEME
Re: Cannont start samp-server by PHP (Win) -
DuRKH3iM - 31.01.2011
He did it, and the error persist. (He talked me about this problem on msn)
Re: Cannont start samp-server by PHP (Win) -
Calgon - 31.01.2011
Does server.cfg even exist in 'C:\sampsvr\'?
Re: Cannont start samp-server by PHP (Win) -
DuRKH3iM - 31.01.2011
Yeah, it exist :S I think the problem is on the line exec(blablabla... The script php doesnt execute the server.cfg, but the server-samp.exe yes.
Re: Cannont start samp-server by PHP (Win) -
bruunosoniico - 31.01.2011
Yah, is like Durhim says, because the output prints that the samp-server started but the server.cfg not yet.
PD: If i start the server normally (by double clicking) it starts perfectly, so there is something wrong with the function.
PD2: If i execute some of that commands in the Windows Shell it runs perfectly.
Re: Cannont start samp-server by PHP (Win) -
bruunosoniico - 03.02.2011
Anyone can help me please ?