Re: exec a perl script

From: Date: Thu, 09 Aug 2001 20:27:35 +0000
Subject: Re: exec a perl script
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-62080@lists.php.net to get a copy of this message
> $command ="/home/kyelateas/cgi-bin/test.pl"; > exec($command, $return, $status); > > if ($return) { > $return = implode("\n", $return); > print "<pre>Data = $return\n\nStatus = $status</pre>"; > } > else # > echo "No data returned"; echo "OS Error $status. Usually paths/permissions. See 'man errno' and count down."; > describing the transaction. It works perfectly from the command line, but Does it work perfectly from the command line if you su to "nobody" (or whomever PHP runs as) before you execute it? Is it world executable? Does it access resources such as PGP key-rings that "nobody" can/cannot access? Are you sure you have the path correct? Do both Perl scripts have exactly the same #! at the beginning? Or is one relying on the .pl ending to be executed properly? (If that's even possible in Un*x.) > lines of output. Why would this be any different for php? I know the > script that connects with the ecommerce server takes a bit longer. Could > that be the problem? It would have to take > 30 seconds, and you'd probably get a PHP error message to that effect. -- WARNING richard@zend.com address is an endangered species -- Use ceo@l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm

« previous php.general (#62080) next »