Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35290 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37436 invoked by uid 1010); 7 Feb 2008 11:15:26 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 37421 invoked from network); 7 Feb 2008 11:15:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Feb 2008 11:15:26 -0000 Authentication-Results: pb1.pair.com header.from=jani.taskinen@sci.fi; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=jani.taskinen@sci.fi; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain sci.fi from 63.208.196.178 cause and error) X-PHP-List-Original-Sender: jani.taskinen@sci.fi X-Host-Fingerprint: 63.208.196.178 mho-01-bos.mailhop.org Received: from [63.208.196.178] ([63.208.196.178:55522] helo=mho-01-bos.mailhop.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2E/09-10179-D48EAA74 for ; Thu, 07 Feb 2008 06:15:26 -0500 Received: from [81.22.163.71] (helo=[10.6.109.198]) by mho-01-bos.mailhop.org with esmtpsa (SSLv3:RC4-MD5:128) (Exim 4.68) (envelope-from ) id 1JN4iw-0007Fa-K5; Thu, 07 Feb 2008 11:15:23 +0000 X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 81.22.163.71 X-Report-Abuse-To: abuse@dyndns.com (see http://www.mailhop.org/outbound/abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/e5ng6/aV3I9KddbOXFEDb92rpGnQfcCk= Reply-To: jani.taskinen@iki.fi To: Rasmus Lerdorf Cc: 'PHP Internals' In-Reply-To: <47AADAB2.8090100@lerdorf.com> References: <47AA5354.7020806@zend.com> <47AA88A9.4000802@lerdorf.com> <1202376366.26463.3.camel@localhost.localdomain> <47AAD2BD.1030804@lerdorf.com> <1202378529.26463.19.camel@localhost.localdomain> <47AADAB2.8090100@lerdorf.com> Content-Type: text/plain Date: Thu, 07 Feb 2008 13:15:20 +0200 Message-ID: <1202382920.26463.36.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.8.3 (2.8.3-2.fc6) Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] _REQUEST and variable_order From: jani.taskinen@sci.fi (Jani Taskinen) A minor clarification: The auto-globals are always there, they're not always _populated_ though. (JIC someone misunderstood this part :) On Thu, 2008-02-07 at 02:17 -0800, Rasmus Lerdorf wrote: [clip] > directives. We should focus on the actual problem and make the fewest > changes possible to solve that. The actual problem being that by > default cookie data is in $_REQUEST and that can lead to problems. So, > we change that default. Now, in the few cases out there where someone So instead of EGPCS the default value of variables_order will be EGPS? > really does want cookie data in $_REQUEST we can provide an ini for them > to enable that. Since today we don't have the ability to have cookie > data in $_REQUEST without also having $_COOKIE present, we won't break > anything by not supporting that edge case. So I think we can tie the > two together and perhaps throw a startup error if someone tries to make > $_REQUEST contain cookie data if variables_order does not include "C" Sounds reasonable. OTOH, what's keeping us from populating the $_REQUEST global "on-demand"? So even if C is not in variables_order but is set in request_variables_order the entries for '$_COOKIE' would be in $_REQUEST but $_COOKIE itself would be empty still. By quick glance to the code would suggest that it should be fairly easy to check in php_auto_globals_create_request() if e.g. Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_COOKIE] is populated or not and if not, call sapi_module.treat_data() there. --Jani -- Patches/Donations: http://pecl.php.net/~jani/