Page 1 of 1

SRCDS implementation

Posted: Sun Aug 31, 2008 1:00 pm
by aquadeluxe
I am working on a script that will allow me to install a game server with SRCDS.

I use this code:

Code: Select all

echo system("cd /location/to/srcds && ./steam -command update -game \"Counter-Strike Source\" -dir ./test");

and it gives me this "Checking bootstrapper version ... Unable to write to the current Steam application folder. Please move Steam to a folder where you have write privileges. "

I set the srcds to 777 and I tried with the user and group as apache, but it still gives me the same error.

Safe mode is off, btw.

Is there a way I can get this to work, or do I need to use something other than PHP for this?

Re: SRCDS implementation

Posted: Sun Aug 31, 2008 1:07 pm
by WebbieDave
Try writing to the location with your own PHP code to see if it works. Also, check your open_basedir setting.

Re: SRCDS implementation

Posted: Sun Aug 31, 2008 1:58 pm
by aquadeluxe
Hmm, it seems as though that is the problem. I try to write to a file and it gives me "failed to open stream: Permission denied"

How would I go about using open_basedir in my script?

Re: SRCDS implementation

Posted: Tue Sep 02, 2008 8:33 pm
by WebbieDave
open_basedir is a configuration setting.

http://us2.php.net/features.safe-mode

Re: SRCDS implementation

Posted: Wed Sep 03, 2008 10:54 am
by aquadeluxe
When I try using fopen and fwrite to a file with an absolute path "/path/to/directory/and/file.ext", it will give me errors if the file isn't already created, but if I use a relative path "../file.ext", it will work fine. I was using "w+" with fopen.

When I use both absolute and relative paths to the srcds directory, it gives me the same error. I have looked at what open_basedir is set to, and it seems like it is set perfectly perfect.

It would be great if someone can help further, and thanks for all of the help already.