Re: behaviour of system()

From: Date: Thu, 11 Jan 2001 07:26:25 +0000
Subject: Re: behaviour of system()
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-33928@lists.php.net to get a copy of this message
> I'm running Suse 7.0 as root, apache runs as wwwrun, so i guess the php > calls also run as wwwrun. Not only does php run as wwwrun, it also runs with a different shell, environment, and most notably path than you do when you log in. You should probably just get in the habit of providing full paths to system/exec for any binary or file involved. If the shell scripts are relying on the current working directory or other environment variables, you'd better be sure you have them set up. You can use PutEnv() in PHP to set them, or alter the wwwrun user's .profile/.bashrc or whatever it is using, if it even has one...

« previous php.general (#33928) next »