Re: PHP Execution Functions

From: Date: Tue, 24 Jul 2001 23:51:44 +0000
Subject: Re: PHP Execution Functions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-59460@lists.php.net to get a copy of this message
> I'm discovering the joys of PHP as supplied by RH on their 7.1 release. > Actually, everything about it is SO much nicer than ASP or pure Perl. (Not > to take anything away from either--PHP's just a LOT easier to get hold of!) > > I'm running PHP as an Apache module (default RedHat installation) but I did > turn Safe Mode on. None of the execution functions work at all, though. > The Safe Mode directory is set to /usr/local/bin and the script I want to > run is (also) in that directory. No matter how I approach it, the system() > or passthru() functions apparently execute nothing and return nothing. Not > even an error message or warning of any kind. (Backticks give a decidedly > pointed message in Safe Mode, though: "No can do" as I would expect). > > How DO I step out of a PHP page and execute a script or command? And would > that method be safe to give to "regular" users? There is no mention in the > manual (to which I constantly refer) nor in any place on the php.net site to > tell me how this should "REALLY" work. Does it work without safe-mode? I'd bet it doesn't. Chances are you have a basic permission problem. The script you are trying to run can not be run by the web server user id. Either the perms on the directory it is in is wrong, or the perms on the script itself is bad. -Rasmus

« previous php.general (#59460) next »