Re: Executing perl scripts in a unix environment running php cgi-module
| From: | Richard Lynch | Date: | Fri, 24 Aug 2001 23:56:01 +0000 |
| Subject: | Re: Executing perl scripts in a unix environment running php cgi-module | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-64364@lists.php.net to get a copy of this message | ||
> Running the cgi-module trying to execute a perl script, dug through the
> archives found something that would at least return something:
>
> exec("/full/path/to/file.cgi", $results, $errorCode);
> while (list(,$line) = each($results)){
> echo $line, "<BR>\n";
> }
> if ($errorCode){
> echo "OS Error: $errorCode<BR>\n";
> }
>
> It spits out nothing but but an error code of 2 ... so basically what i
get
> from it is OS Error: 2.
man errno
will tell you exactly which error that is.
(You have to count down, so it's the second one.)
I'm betting on path/permissions problem.
You are not running this Perl scripts as you -- You're running as "nobody"
or whomever is set by the User directive in httpd.conf
You are also not running in your normal shell with your normal environment
variables. You are running in "nobody"s shell with their environment
set-up.
--
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