Re: #! scripts as PHP scripts

From: Date: Tue, 06 Feb 2001 00:36:51 +0000
Subject: Re: #! scripts as PHP scripts
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-45823@lists.php.net to get a copy of this message
At 02:31 AM 2/6/01 +0200, Zeev Suraski wrote:
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..?
Until 4.0.4pl1, I've never had a problem with running scripts that had #!/usr/local/bin/php as the first line. I could do:
        php -q foo.php
or:
        ./foo.php (after chmod +x)
And it worked - and still works on Linux. Solaris is a different matter, though... -Andrei

« previous php.dev (#45823) next »