The current CGI implementation supports a different way of running PHP
scripts as if they were executables, using #!/usr/local/bin/php style header.
The current implementation also inconsistently handles files of that format
that are executed as regular PHP scripts (i.e., under the Apache module, or
even when running through the PHP CGI under a Web server).
In most circumstances, the CGI implementation will 'swallow' the first line
if it begins with #. That's despite the fact that inside the context of a
CGI (cgi=1), this line is pretty much meaningless, and worse, it's quite
legitimate to have a file begin with #...
In one case only (if the startup code couldn't determine which file to
open, and reverts to argv0), then it will actually treat this line properly
and display it as regular output.
In my opinion - if people want to run such files as CGI's, they should be
using .cgi extension and +x them, and not run them through the php.exe CGI
as .php files. At any rate, we need to decide which of the two behaviors
is correct, because right now, both are possible (Netscape Server appears
to be one of the only servers that display the rare case, in which this
line is not swallowed and displayed as regular text).
Other opinions..?
Zeev
--
Zeev Suraski <[EMAIL PROTECTED]>
CTO & co-founder, Zend Technologies Ltd. http://www.zend.com/
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]