Cannont start samp-server by PHP (Win)
#1

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

open server.cfg and rcon_password CHANGEME
Reply
#3

He did it, and the error persist. (He talked me about this problem on msn)
Reply
#4

Does server.cfg even exist in 'C:\sampsvr\'?
Reply
#5

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

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

Anyone can help me please ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)