Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59812 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20374 invoked from network); 12 Apr 2012 23:57:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Apr 2012 23:57:18 -0000 Authentication-Results: pb1.pair.com smtp.mail=kris.craig@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=kris.craig@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.42 as permitted sender) X-PHP-List-Original-Sender: kris.craig@gmail.com X-Host-Fingerprint: 74.125.82.42 mail-wg0-f42.google.com Received: from [74.125.82.42] ([74.125.82.42:60522] helo=mail-wg0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7D/D8-00290-CDB678F4 for ; Thu, 12 Apr 2012 19:57:17 -0400 Received: by wgbds11 with SMTP id ds11so5273085wgb.5 for ; Thu, 12 Apr 2012 16:57:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=D9JMrD/bPtPL5agGq5XHdVWd/mEdTU6JXCOCrXyfK/c=; b=DIypfJmNiMdP3TPkgZrN/v1ed4BJsh9ZRwkQ4Pr+StOuS2BD3SLpzxLjthfywuggev +kwPGZzZ9eaH99gVVnmMDH+OtbKxdCfvnOelK1RBW8pnn/JsJe5nM5cu89Yk4/Maf8HZ M/nhuRHBoIZ0S8CDcPAW/dh3nUxNE7Ypg1bCDwdUpY+INbWZMpCLiC+0rdSye0Hsi2nc Uzbrwds828sEjTYkOlOFYVIT120rxBg0PMmveKv5v8V7Rb/3AdvSX1jBtkY2g5QKKdF9 xK1WrSoZ3hBosIIxpDsk6sr0dZ1ZF6+fnD4q42CULrJ1gvXtf2BX19EEYS2kHrUu5mcK fbXA== MIME-Version: 1.0 Received: by 10.180.81.166 with SMTP id b6mr88955wiy.0.1334275033631; Thu, 12 Apr 2012 16:57:13 -0700 (PDT) Received: by 10.223.79.67 with HTTP; Thu, 12 Apr 2012 16:57:13 -0700 (PDT) In-Reply-To: References: Date: Thu, 12 Apr 2012 16:57:13 -0700 Message-ID: To: Yasuo Ohgaki Cc: PHP internals list Content-Type: multipart/alternative; boundary=f46d0442811e698aff04bd841d61 Subject: Re: [PHP-DEV] [RFC] New .phpp File Type for Pure-Code PHP Scripts From: kris.craig@gmail.com (Kris Craig) --f46d0442811e698aff04bd841d61 Content-Type: text/plain; charset=ISO-8859-1 On Thu, Apr 12, 2012 at 4:38 PM, Yasuo Ohgaki wrote: > Hi, > > 2012/4/13 Kris Craig : > > Per recent discussions, I have drafted an RFC for this. This proposal > > offers what I believe to be a more sane and realistic approach to > > addressing the question of incorporating a new breed of tag-less PHP > > scripts. > > > > https://wiki.php.net/rfc/phpp > > This may work for LFI issue for new codes. > Few questions. > > CLI may use .phpp as PHP script always. (i.e. execute w/o It's like DOS, though. > > How do you enforce .phpp as script only for Web? > Is it a rule for configuration? or .phpp just never supposed to locate > under docroot? > It relates previous question. How about bootstrap script for frameworks? > I'm not sure what the best SAPI configuration would be, but if I had to throw out an educated guess, I'd say the .phpp extension would just go through a separate handler. All the code in the file would then be parsed as PHP, with the added error conditions as described in the RFC. So I don't anticipate there being any problems once the webserver has been configured to recognize the new file extension. The files can be included or accessed directly via HTTP (though in most cases I wouldn't recommend that from an architectural standpoint, AJAX notwithstanding of course). > > > A regular .php script cannot be included from a .phpp script. An > E_WARNING will be thrown for include and an E_RECOVERABLE_ERROR will be > thrown for require; in both instances, the included file will be ignored. > > Some people may try to make .phpp handled by web. > Though not necessarily required, my thinking is that that should be ok, so long as the webserver is configured to know what to do with it of course. It's conceivable that certain AJAX calls might want to take advantage of pure scripts, for example. > I cannot tell if this setting is going to be popular, but if it > does, isn't it the end of embedded PHP? > I see no reason why it should be. Embedded PHP will still be there exactly as it is now; the .php file extension will not be changed by this RFC whatsoever. As far as whether people will continue using embedded PHP, I have no idea and I'm guessing there'd probably strong opinions on both sides of that. This RFC doesn't attempt to address that question, though. The future of embedded PHP is a separate topic entirely. But my gut feeling is, so long as there are developers who continue to want it, it'll still be there for them. It might be good if PHP is more tolerant for this usage. > > Regards, > > -- > Yasuo Ohgaki > yohgaki@ohgaki.net > --f46d0442811e698aff04bd841d61--