Re: PHP4.0.6 Installed as CGI - #!/usr/local/php/php line echoed with output

From: Date: Thu, 16 Aug 2001 01:30:00 +0000
Subject: Re: PHP4.0.6 Installed as CGI - #!/usr/local/php/php line echoed with output
References: 1  Groups: php.install 
Request: Send a blank email to php-install+get-3988@lists.php.net to get a copy of this message
All, Found the solution in another posting. You need to use the --enable-discard-path option when compiling PHP. Evidently, this supresses the output of the #!/path header output when using PHP as a CGI application. Thx Gary Betz wrote: > I've installed PHP4.0.6 as a CGI application. I have everthing working > and I can run my scripts from the command line with no problems. > > The problem lies in when I install my php script into the cgi-bin > directory and run it from a browser. The header line in the script gets > echoed along with the script output. For example, here's the script: > > #!/usr/local/php4.0.6/bin/php > > <? > $hourdiff = "-3"; // hours difference between server time and local time > > $timeadjust = ($hourdiff * 60 * 60); > > $mydate = date("l, F dS, Y",time() + $timeadjust); > > print ("$mydate"); > > ?> > > This is the ouput: > > #!/usr/local/php4.0.6/bin/php Wednesday, August 15th, 2001 > > Any suggestions? I tend to believe its an Apache configuration issue, > but I not sure specifically. I'm running Apache 1.3.17. > > Thanks

« previous php.install (#3988) next »