Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50890 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56049 invoked from network); 7 Dec 2010 11:40:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Dec 2010 11:40:37 -0000 Authentication-Results: pb1.pair.com smtp.mail=rquadling@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rquadling@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: rquadling@gmail.com X-Host-Fingerprint: 209.85.213.42 mail-yw0-f42.google.com Received: from [209.85.213.42] ([209.85.213.42:46867] helo=mail-yw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B2/02-40992-43D1EFC4 for ; Tue, 07 Dec 2010 06:40:37 -0500 Received: by yws5 with SMTP id 5so513770yws.29 for ; Tue, 07 Dec 2010 03:40:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:reply-to :in-reply-to:references:from:date:message-id:subject:to:cc :content-type; bh=EKuKsPzWzvjOfsqfQVWsZGG+HCTwKk/G2GbX4nhYaEc=; b=g3S7MhuUX8stboBgO06JI1sF8B6zMr5wC15sPfRigm5I2SusjFtPBqof7KhVQ4fywA 0bYj0ZEC8g2Gordpp+qnQXF1LkFwukU7HNIUm6/9ymRS9hoVLl9Wn2MT6YFjGE3Z9q6j OCH039ML0P8BASuLl2oFvOjgOmbUph1XNuXJI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; b=SyuHUt8JmsU4sf9Oh+qMXDiOcGot+tn47ObSXRrB+umT4HrdHbHm54kulibsORv0Zu KB97WQ/i6+bQp2mRNUrCV2+y1y9UwK6Ig0JD5G1DYUwD3h2Y5/4yob+sTIvbaV6cWRuz JCABVj4kasZTzurijLPkgu3pTjVOIdzFiO1fc= Received: by 10.229.212.72 with SMTP id gr8mr5572770qcb.177.1291722034246; Tue, 07 Dec 2010 03:40:34 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.100.130 with HTTP; Tue, 7 Dec 2010 03:40:14 -0800 (PST) Reply-To: RQuadling@googlemail.com In-Reply-To: References: Date: Tue, 7 Dec 2010 11:40:14 +0000 Message-ID: To: Gustavo Lopes Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [PATCH] Add option to disable POST data processing From: rquadling@gmail.com (Richard Quadling) On 7 December 2010 07:08, Gustavo Lopes wrote: > The very simple attached patch adds an option to disable POST data > processing, which implies the data can only be read in a stream fashion > through php://input. > > As far as I know, PHP offers no way to inhibit processing RFC 1867 data and > one has to use very hacky means to accomplish that. This is often required > (or at least convenient) in order to, e.g., proxy requests or handle file > uploads in memory. > > For other types of requests, the default processing of POST data may also be > a problem. Take a non-application/x-www-form-urlencoded POST requests (say, > some kind of RPC with a big XML payload) -- PHP is very memory inefficient > as it will hold the whole POST data into memory and duplicate it twice (from > SG(request_info).post_data to $HTTP_RAW_POST_DATA -- even if > always_populate_raw_post_data=0 -- and SG(request_info).raw_post_data). > > This introduces a new ini setting, disable_post_data_processing, but it's a > benign one. No incompatibilities between setups will arise because no one > will enable it globally (it would be insane), only selectively to the > scripts that require it. The reason for an ini setting is that it must be > set early in the request life. > > Thoughts? > > -- > Gustavo Lopes > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > As I understand things, the super globals are already populated by the time the script starts execution. So, ini_set() will have no impact. Can you set an ini option for a single script via some other method? -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY