PHP as CGI, Apache crashing...

From: Date: Sun, 19 Nov 2000 11:54:58 +0000
Subject: PHP as CGI, Apache crashing...
Groups: php.general 
Request: Send a blank email to php-general+get-26118@lists.php.net to get a copy of this message
I am trying to run PHP as both a module and a CGI (module for speed, CGI for suexec). I have the php binary, and I can execute my file just fine. it produces the following result: --------- [jdavis@jdavis www]$ ./php.cgi # cgi written in PHP Content-type: text/html hi, done [jdavis@jdavis www]$ ./py.cgi # same thing but in Python Content-type: text/html hi, done [jdavis@jdavis www]$ --------- I use the '#!/usr/bin/php' notation at the top of the file, and I also use suexec for apache. In my webserver, I can access py.cgi perfectly and it prints "hi, done" in the browser. When I try to view php.cgi, I get a "Premature end of script headers". Any ideas? I made the script executable just the same, as demonstrated above. Also, I accidently set the path at the top of the script ( '#!' notation, for interpreted excutables) to a directory. This basically caused apache to crash ( "document returned no data" errors and error_log was filled with segmentation faults). Isn't this a security problem? If it is worrisome, where should I report it first? I am using apache 1.3.14 and I am using suexec. Thanks, Jeff Davis

« previous php.general (#26118) next »