Re: CGI-executable Apache

From: Date: Mon, 05 Jun 2000 16:41:59 +0000
Subject: Re: CGI-executable Apache
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-1055@lists.php.net to get a copy of this message
When I run it from Command line, it works Here is the output when I do $ test.cgi X-Powered-By: PHP/4.0.0 Content-type: text/html Hello World However, when I try it from the browser, here is the error message [Mon Jun 5 12:27:30 2000] [error] [client XXX.XXX.XXX.XXX] Premature end of script headers: /usr/local/www/virtual_host/cgi-bin/test.cgi A perl cgi executable worked fine (not problems at all). I do have another version of PHP compiled into apache, but the extention of the file is .cgi, so that shouldn't matter. Any ideas? Rasmus Lerdorf wrote: > And what does it print when you run it from the command line? And what is > in your error_log? > > On Mon, 5 Jun 2000, Victor wrote: > > > Well, here is my test.cgi > > > > #!/usr/local/apache/bin/php > > <?php print "Hello World\n"; ?> > > > > Here is the error that is generated: > > Premature end of script headers: /usr/local/www/virtual_site/cgi-bin/test.cgi > > > > Rasmus Lerdorf wrote: > > > > > Set it up just like you would a Perl cgi.

« previous php.general (#1055) next »