PHP 4.0 Bug #8506 Updated: CGI PHP doesn't erase the #!/path/to/php
| From: | vladnc at hotmail dot com | Date: | Tue, 02 Jan 2001 20:29:53 +0000 |
| Subject: | PHP 4.0 Bug #8506 Updated: CGI PHP doesn't erase the #!/path/to/php | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-42672@lists.php.net to get a copy of this message | ||
ID: 8506
User Update by: vladnc@hotmail.com
Old-Status: Closed
Status: Open
Bug Type: Scripting Engine problem
Description: CGI PHP doesn't erase the #!/path/to/php
"PHP does not require the first line that you are including unlike perl due to the way its
set up in apache."
You're wrong. PHP is not set up at all in Apache. Look what happens if I delete the first
line:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>500 Internal Server Error</TITLE>
</HEAD><BODY>
<H1>Internal Server Error</H1>
The server encountered an internal error or
misconfiguration and was unable to complete
your request.<P>
Please contact the server administrator,
webmaster@book.ecompare-corp.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.<P>
More information about this error may be available
in the server error log.<P>
<HR>
<ADDRESS>Apache/1.3.12 Server at book.ecompare-corp.com Port 80</ADDRESS>
</BODY></HTML>
Server error log:
[Mon Jan 1 16:00:34 2001] [error] [client 212.54.118.28] Premature end of script headers:
/home/httpd/cgi-bin/vxml/engines/kbb/phpinfo2.php
Previous Comments:
---------------------------------------------------------------------------
[2001-01-02 14:49:34] jmoore@php.net
PHP does not require the first line that you are including unlike perl due to the way its set up in
apache.
---------------------------------------------------------------------------
[2000-12-31 21:13:47] vladnc@hotmail.com
The script is:
--- Cut ---
#!/home/vladimir/php4/bin/php
<% phpinfo () %>
--- Cut ---
You can see the result at http://book.ecompare-corp.com/cgi-bin/vxml/engines/kbb/phpinfo.php
The first line of the page is #!/home/vladimir/php4/bin/php, and that's very annoying. I'm
using PHP to generate XML output, and the XML parser that will read the output doesn't like the
first line, and I can't blame it.
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=8506