Bug #14170 Updated: #!/path/to/php shows up on every php script
| From: | sniper@php.net | Date: | Wed, 10 Apr 2002 23:27:31 +0000 |
| Subject: | Bug #14170 Updated: #!/path/to/php shows up on every php script | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-4605@lists.php.net to get a copy of this message | ||
ID: 14170
Updated by: sniper@php.net
Reported By: jgarrett@byu.edu
-Status: Duplicate
+Status: Closed
Bug Type: *General Issues
Operating System: Linux RH 7.1
PHP Version: 4.0CVS-2001-11-22
Previous Comments:
------------------------------------------------------------------------
[2001-11-22 15:17:15] sniper@php.net
Duplicate of #9041
------------------------------------------------------------------------
[2001-11-22 13:00:33] sander@php.net
No, the point is if you run a script as a conventional CGI-script (just
like you can run shell scripts through CGI), the line with
#!/path/to/php shows up...
Normally, if you run PHP as CGI via Apache, some lines in httpd.conf
say that *.php should be parsed through /usr/local/bin/php
It's not necessary to use that. Alternatively, you could use
#!/path/to/php if the server has (plain) CGI enabled. It's usefull i.e.
if you have built a dev-version of PHP somewhere and don't want to
install it, but just use it for a few scripts to test new
functionality.
And about magic stuff: the patch which hides #! when running via the
command line, has already been commited... isn't that magic too?
Workaround: enable output buffering in your php.ini and start your
scripts with ob_end_clean();.
------------------------------------------------------------------------
[2001-11-22 12:23:30] mfischer@php.net
Err ... whats the point of using this in a CGI?
I understand, some kind of portability probably (running it from CMD
and CGI) but this is some dirty magic stuff IMHO.
Its just a text file which gets processed and when it starts with #!
then it starts with #! and therefore the output shall be #!.
However, I've an open mind for that :)
------------------------------------------------------------------------
[2001-11-22 10:54:56] jmoore@php.net
Sounds like a misconfiguration to me.
------------------------------------------------------------------------
[2001-11-22 10:50:49] sander@php.net
Nope, this bug only shows up if you run it through CGI. Running from
the command-line works fine.
------------------------------------------------------------------------
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/14170
--
Edit this bug report at http://bugs.php.net/?id=14170&edit=1