Re: shebang skipping in 5.3.0
| From: | Keisial | Date: | Sat, 05 Sep 2009 12:02:35 +0000 |
| Subject: | Re: shebang skipping in 5.3.0 | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-45496@lists.php.net to get a copy of this message | ||
Andi Gutmans wrote:
> Shebang is for command line scripts (php-cli). It does not make sense to
> support it for Web server scripts. It just adds unnecessary
> code/complexity to that code base. Removing the support from php-cgi was
> really a remnant of the old days when cli and cgi were the same SAPI.
> I think we are better off this way.
>
> Andi
>
Why doesn't is make sense? It is a legitimate usage, and if novody used
it, it wouldn't have noticed.
>
> Case 4: PHP parser outside of web tree
>
> A very secure option is to put the PHP parser binary somewhere outside
> of the web tree of files. In /usr/local/bin, for example. The only
> real downside to this option is that you will now have to put a line
> similar to:
>
> #!/usr/local/bin/php
>
>
> as the first line of any file containing PHP tags. You will also need
> to make the file executable. That is, treat it exactly as you would
> treat any other CGI script written in Perl or sh or any other common
> scripting language which uses the /#!/ shell-escape mechanism for
> launching itself.
>
http://php.net/manual/en/security.cgi-bin.shell.php