Bug #8506 Updated: CGI PHP doesn't erase the #!/path/to/php
| From: | sniper@php.net | Date: | Tue, 18 Jun 2002 22:18:22 +0000 |
| Subject: | Bug #8506 Updated: CGI PHP doesn't erase the #!/path/to/php | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-11219@lists.php.net to get a copy of this message | ||
ID: 8506
Updated by: sniper@php.net
Reported By: vladnc@hotmail.com
-Status: Duplicate
+Status: Closed
Bug Type: *General Issues
Operating System: Red Hat Linux release 6.0
PHP Version: 4.0.4
New Comment:
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a
documentation
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2001-04-16 06:57:20] jmoore@php.net
dup of 8898
------------------------------------------------------------------------
[2001-03-12 11:41:01] vladnc@hotmail.com
denice.deatrich@epfl.ch has a similar problem on a different platform:
--- Start Quote ---
This problem exists also for NT4 with server signature:
Server: Apache/1.3.14 (Win32) PHP/4.0.4pl1
If I do not put:
#!/php/php
at the top of the file then I get an apache server error and this
message in error.log:
[Mon Mar 12 14:08:39 2001] [error] [client xxxx]
c:/apache/cgi-bin/hello.php4 is not executable; ensure interpreted
scripts have "#!" first line
[Mon Mar 12 14:08:39 2001] [error] [client xxxx] couldn't spawn child
process: c:/apache/cgi-bin/hello.php4
As soon as I put it back it works.
An example script:
#!/php/php
<?php
echo "<br>hello cgi<br>";
?>
but the html-source generated by this is (from browser's "view
source"):
#!/php/php
<br>hello cgi<br>
Of course, you can hide it with a trick like:
<body bgcolor="black"><font color="white">...
but that's ugly too...
--- End Quote ---
------------------------------------------------------------------------
[2001-03-08 09:12:26] vladnc@hotmail.com
The only lines concerning PHP in httpd.conf are:
AddType application/x-httpd-php3 .php3
AddType application/x-httpd-php3-source .phps
And, since I use .php as file extension, this lines are
irrelevant.
------------------------------------------------------------------------
[2001-03-06 08:01:40] stas@php.net
What is your apache configuration for PHP scripts?
------------------------------------------------------------------------
[2001-01-02 15:41:55] vladnc@hotmail.com
And if you still have any doubts, thinking that Apache has reconized
the file extension and is not using the cgi version, try
http://book.ecompare-corp.com/cgi-bin/vxml/engines/kbb/phpinfo.vxml
The output is the same. And if you read the php output on both pages
you'll see that PHP is run as CGI (Server API CGI).
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/8506
--
Edit this bug report at http://bugs.php.net/?id=8506&edit=1