Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45500 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94180 invoked from network); 5 Sep 2009 13:12:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Sep 2009 13:12:45 -0000 Authentication-Results: pb1.pair.com smtp.mail=tom@punkave.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=tom@punkave.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain punkave.com from 209.85.132.249 cause and error) X-PHP-List-Original-Sender: tom@punkave.com X-Host-Fingerprint: 209.85.132.249 an-out-0708.google.com Received: from [209.85.132.249] ([209.85.132.249:34856] helo=an-out-0708.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B3/60-08099-CC362AA4 for ; Sat, 05 Sep 2009 09:12:45 -0400 Received: by an-out-0708.google.com with SMTP id d14so631253and.38 for ; Sat, 05 Sep 2009 06:12:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.101.56.13 with SMTP id i13mr1309760ank.194.1252156362090; Sat, 05 Sep 2009 06:12:42 -0700 (PDT) In-Reply-To: <4AA25E16.7040803@sci.fi> References: <20090904081640.GA28685@joeysmith.com> <753B9AED-C850-4EBA-A828-93A2542F81A2@macvicar.net> <20090904083457.GC28685@joeysmith.com> <698DE66518E7CA45812BD18E807866CE034153BA@us-ex1.zend.net> <4AA24FDB.90409@sci.fi> <4AA25E16.7040803@sci.fi> Date: Sat, 5 Sep 2009 09:12:42 -0400 Message-ID: To: jani.taskinen@iki.fi Cc: Pierre Joye , Andi Gutmans , Joey Smith , internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] shebang skipping in 5.3.0 From: tom@punkave.com (Tom Boutell) Surprisingly, the CGI programming book I wrote in 1995 is relevant to this conversation. (: We're forgetting our history here. CGI =3D Common Gateway Interface =3D web servers running stuff as normal executables. That means, yes, shebang path support is important! It's great that modern web servers can be configured to automatically recognize .php and run the PHP interpreter without the extra step of the OS interpreting the shebang. But that's not mandatory. If it's mandatory, you better stop calling it CGI. Without shebang support, it's incompatible with perfectly valid CGI implementations. And that means it's broken as a SAPI for CGI. On Sat, Sep 5, 2009 at 8:48 AM, Jani Taskinen wrote: > You obviously don't understand at all what this is used for. > Consider the case where you can't change webserver's configs. > Or that you want to quickly test different PHP versions. > What would be easier than simply switching the version in the shebang lin= e? > Quite legitimate and useful to me. And this has NOTHING to do with CLI. > > --Jani > > > Pierre Joye wrote: >> >> I'm not totally convinced by this argument. CGI is definitively a >> different SAPI than CLI and can behave differently. It was a problem >> before when we had only one command for both CLI and CGI, but that's >> not the case anymore. >> >> We should better document CLI and recommend to always install it shell >> usage is planed (and distros should install it by default as well). >> >> On Sat, Sep 5, 2009 at 1:47 PM, Jani Taskinen wrot= e: >>> >>> It's very legit to use with CGI since you might not be able to run PHP >>> any >>> other way. So this is definately a bug, CGI should handle it the same a= s >>> CLI. >>> >>> The bug report clearly explains it too: >>> >>> =A0http://bugs.php.net/bug.php?id=3D49182 >>> >>> --Jani >>> >>> 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 w= as >>>> really a remnant of the old days when cli and cgi were the same SAPI. >>>> I think we are better off this way. >>>> >>>> Andi >>>> >>>>> -----Original Message----- >>>>> From: Joey Smith [mailto:joey@joeysmith.com] >>>>> Sent: Friday, September 04, 2009 1:35 AM >>>>> To: internals@lists.php.net >>>>> Subject: Re: [PHP-DEV] shebang skipping in 5.3.0 >>>>> >>>>> I definitely had the wrong changeset - sorry, Nuno. :) Looks >>>>> like maybe 273177 is the problem child. >>>>> >>>>> http://tinyurl.com/lewcft >>>>> >>>>> >>>>> On Fri, Sep 04, 2009 at 09:25:52AM +0100, Scott MacVicar wrote: >>>>>> >>>>>> On 4 Sep 2009, at 09:16, Joey Smith wrote: >>>>>> >>>>>>> I can understand not having the 'shebang skipping' code >>>>>>> in both the SAPI *and* the scanner, but we probably >>>>>>> need to have it in at least ONE of them. :) >>>>>>> >>>>>>> Per his email[1] almost a year ago, Dmitry removed the >>>>>>> shebang line check from sapi/cgi/cgi_main.c in changeset >>>>>>> 264153, saying: >>>>>>> =A0Removed shebang line check from CGI sapi (it is >>>>>>> =A0 =A0 =A0checked by scanner) >>>>>>> >>>>>>> In http://tinyurl.com/me8528 (changeset 262275), nlopess >>>>>>> removed the code from the scanner. >>>>>>> >>>>>>> Oops? >>>>>> >>>>>> What's the problem your having? The skip code is still there just in >>>> >>>> a >>>>>> >>>>>> different bit. >>>>>> >>>>>> Scott >>>>>> >>>>>> -- >>>>>> PHP Internals - PHP Runtime Development Mailing List >>>>>> To unsubscribe, visit: http://www.php.net/unsub.php >>>>>> >>>>> -- >>>>> PHP Internals - PHP Runtime Development Mailing List >>>>> To unsubscribe, visit: http://www.php.net/unsub.php >>>> >>> >>> -- >>> PHP Internals - PHP Runtime Development Mailing List >>> To unsubscribe, visit: http://www.php.net/unsub.php >>> >>> >> >> >> > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --=20 Tom Boutell P'unk Avenue 215 755 1330 punkave.com window.punkave.com