Re: #!/path/to/php at top of output from CGI

From: Date: Fri, 05 Jan 2001 04:54:03 +0000
Subject: Re: #!/path/to/php at top of output from CGI
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-32820@lists.php.net to get a copy of this message
My aplogies - I didn't take note of the fact that you'd said you'd named it php.cgi earlier - I wouldn't have made the suggestion about an existing handler. Try changing #!/usr/local/bin/php to #!/usr/local/bin/php -q and see if it still gets printed, and even actually works instead of causing an 'Internal Server Error' thorugh lack of headers. Also, ensure the php.cgi script does not include any other scripts that might have the same shell escape sequence at the top. It looks like the script is being interpreted by the Php module somehow before the shell escape at the top is even used, or considered. ----- Original Message ----- From: "Jeff Davis" <jdavis@wasabimg.com> To: "Jason Brooke" <jason@qgl.org> Cc: <php-general@lists.php.net> Sent: Friday, January 05, 2001 2:31 PM Subject: Re: [PHP] #!/path/to/php at top of output from CGI > Hmm.. I tried a new extension that shouldn't have anything associated with it > (.pcgi). Also, perl/C work under the .cgi extension. Stranger yet, if I do: > ~/www$ ./php.cgi > out > the file 'out' has no '#!/usr/local/bin/php' in it. However if I go to the > browser and execute the CGI thru the webserver it still puts that at the top > (as if it was plaintext, like you said, because it is outside the <??>). Then, > the phpinfo() goes right below it as if nothing was wrong (it outputs fine, > with all the information about php and my environment). > > I have the module installed, but I don't think that should make a difference > right? > > Thanks very much, it is sort of important that I figure out how to get the CGI > to work. > > Jeff Davis

« previous php.general (#32820) next »