Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58943 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13970 invoked from network); 14 Mar 2012 22:48:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Mar 2012 22:48:18 -0000 Authentication-Results: pb1.pair.com smtp.mail=keisial@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=keisial@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.176 as permitted sender) X-PHP-List-Original-Sender: keisial@gmail.com X-Host-Fingerprint: 209.85.212.176 mail-wi0-f176.google.com Received: from [209.85.212.176] ([209.85.212.176:52399] helo=mail-wi0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F6/A2-32926-030216F4 for ; Wed, 14 Mar 2012 17:48:17 -0500 Received: by wibhm17 with SMTP id hm17so7326761wib.11 for ; Wed, 14 Mar 2012 15:48:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=fDGB9WpF39sM8/p5Ue6GWQPM3uP2XaEM1pOndErDPoA=; b=E3ir6I8SG/6ozuZw+YbgkC1irmk8SlSMmbYbqF8AIgwn4FWqh+X/ALxtl0lfrvXFI7 m57Ri6PLM0cSydV4s58VY6VomkSQ3axeCUPtH8Kw1BlOam0A0bq4o3m4ET1hc38cCKk5 4NfaSln4VxWsin3OpWH4uckeVNmDbPdnedE1TXXe/WlBlXa5Z2qTpt8GCNPAWNUwAfV0 +9WjU5MbIb5j9Kr/O6BBqrr339Imse8wJuJM+5RbEv3HdbF4x03e4c4yBtpR6PPDldTB dbdPGCfoIdSy8d8uSTuq0loatDev1zwHoIoAIbaRT5cB+fhrnHck60kp7TuBP+4l8Ueg arKg== Received: by 10.180.84.164 with SMTP id a4mr10289039wiz.2.1331765293200; Wed, 14 Mar 2012 15:48:13 -0700 (PDT) Received: from [192.168.1.26] (236.Red-83-61-176.dynamicIP.rima-tde.net. [83.61.176.236]) by mx.google.com with ESMTPS id 9sm96513wid.2.2012.03.14.15.48.10 (version=SSLv3 cipher=OTHER); Wed, 14 Mar 2012 15:48:11 -0700 (PDT) Message-ID: <4F612157.7010609@gmail.com> Date: Wed, 14 Mar 2012 23:53:11 +0100 User-Agent: Thunderbird MIME-Version: 1.0 To: Rasmus Lerdorf CC: PHP internals References: <4F60F4B1.5010407@lerdorf.com> In-Reply-To: <4F60F4B1.5010407@lerdorf.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Let parse_str() parse more than max_input_vars args From: keisial@gmail.com (=?ISO-8859-1?Q?=C1ngel_Gonz=E1lez?=) On 14/03/12 20:42, Rasmus Lerdorf wrote: > It is somewhat unintuitive that parse_str() is subject to the > max_input_vars limitation and there are sites that use parse_str() to > parse things that aren't directly coming from user query args. > There arr two ways to solve this. We could add an optional max_vars arg > something along these lines: > > https://gist.github.com/2038870 > > The other way to solve this would be to make max_input_vars PHP_INI_ALL > and then just let people ini_set() their way around the limit. > > The one drawback with the optional arg approach is that since > parse_str() is a thin layer on top of the query string parser, the error > if you exceed the passed max_vars talks about the ini setting which in > this case wouldn't really be correct and fixing that would be complicated. > > -Rasmus Configuring it through ini_set would be a hack. +1 for doing it by a new str_parse() parameter. I'm not really keen of implementing that setting and restoring PG(max_input_vars), but as a fast fix, it's ok.