Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40237 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23847 invoked from network); 3 Sep 2008 20:33:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Sep 2008 20:33:35 -0000 Authentication-Results: pb1.pair.com header.from=dafneves@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=dafneves@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 64.233.166.176 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: dafneves@gmail.com X-Host-Fingerprint: 64.233.166.176 py-out-1112.google.com Received: from [64.233.166.176] ([64.233.166.176:43257] helo=py-out-1112.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 58/86-45151-C94FEB84 for ; Wed, 03 Sep 2008 16:33:33 -0400 Received: by py-out-1112.google.com with SMTP id a25so1568497pyi.16 for ; Wed, 03 Sep 2008 13:33:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=LVnr4WUfJ6utmBg20WceMaYo2X3SIXCBpUwhltHiv88=; b=sGqDr/mQ8bWX0I2l1pyYdNE1ZimO2BeGwdCqsg78UqeoziFZPptPsvNu920MmkbVVb oW2B8WGCKSy5yKyWAZGmLhVvcGH8txjFYeJEbdkIK8bxaNctOiNC33ixwj+Tzbo9jYDw lP4ZO/vzUmqjuVevIl/cbofQNhKKAeWiaq++M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=JUJh5KEPvRgn/2dXFGbqrpHLk7Zsa5SmZhdLdDCQ0D6ftilnQMNXZ6JtO0FQtiEFYO 2FEmvP7lyZC5/+6whR6red2an3n4VYuU/nrRByKPhn7xYj6lDBR/D7FzE2JvmFzuRL6J 39GqBGpkm8XQxs5oQQddpD6Zs1NUsQFZA3rlw= Received: by 10.64.242.5 with SMTP id p5mr18983459qbh.80.1220474010180; Wed, 03 Sep 2008 13:33:30 -0700 (PDT) Received: by 10.65.242.4 with HTTP; Wed, 3 Sep 2008 13:33:30 -0700 (PDT) Message-ID: <87ae45950809031333w527f6bob0b8a97893ce18c1@mail.gmail.com> Date: Wed, 3 Sep 2008 21:33:30 +0100 To: "Arnaud Le Blanc" Cc: "Dmitry Stogov" , jani.taskinen@iki.fi, "Lukas Kahwe Smith" , "Marcus Boerger" , "Stanislav Malyshev" , "PHP Internals List" In-Reply-To: <200809030030.48091.arnaud.lb@gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_24546_12130764.1220474010151" References: <48BCFF84.9080801@zend.com> <48BD0A53.2030202@sci.fi> <48BD1226.5010902@zend.com> <200809030030.48091.arnaud.lb@gmail.com> Subject: Re: [PHP-DEV] BUG #45392 From: dafneves@gmail.com ("Diogo Neves") ------=_Part_24546_12130764.1220474010151 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tue, Sep 2, 2008 at 11:30 PM, Arnaud Le Blanc wrote: > Hi, > > On Tuesday 02 September 2008 12:15:02 Dmitry Stogov wrote: > > > > Jani Taskinen wrote: > > >>> Dmitry Stogov wrote: > > >>>> Hi, > > >>>> > > >>>> Attached is a proposed fix for http://bugs.php.net/bug.php?id=45392for > > >>>> PHP_5_3. I don't know output buffering part very well, and I'm not > > >>>> completely sure about this fix, so please review it. > > >>>> > > >>>> The patch changes behavior of output buffering a bit. In case of > fatal > > >>>> error all output buffers opened by ob_start() with zero (or omitted) > > >>>> chunk_size argument are discarded. The fix brakes two tests: > > >>>> > > >>>> Test session_module_name() function : variation > > >>>> [ext/session/tests/session_module_name_variation3.phpt] > > >>>> Test session_set_save_handler() function : error functionality > > >>>> [ext/session/tests/session_set_save_handler_error3.phpt] > > >>>> > > >>>> We need to make a decision about #45392. > > >>>> > > >>>> 1) Fix it with proposed (or similar) patch > > >>>> > > >>>> 2) Make it bogus because any fix requires output buffering behavior > > >>>> change > > > > > > Sorry for top-posting. Anyway, reading the patch made me think that > > > maybe in the user/recoverable cases the output buffer should not be > > > discarded like this..? > > > > > > And IMO, it's a bug, bugs should be fixed even if it means changing the > > > behaviour in an _edge_ case. > > > > I'm not so sure as http://www.php.net/manual/en/function.ob-start.php > > doesn't make difference between successful and unsuccessful request and > > assumes "output buffer is flushed to the browser at the end of the > request". > > I think that it is critical to output this kind of buffer in case of fatal > error, as it may unexpectedly leak data which was not meant to be output. > It > seems Ok to me to discard this kind of buffers in this case. > > > > > > How do those session tests fail..? > > > > As they have ob_start() at top, the output is discarded and only error > > message is printed. > > > > > They expect output with fatal errors? (actually those tests failed > > > without your patch too, IIRC :) > > > > They works for me without the patch. > > > > Thanks. Dmitry. > > > > > --Jani > > > > > > > Regards, > > Arnaud > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > Hi all, [Warning] I don't know the insides of php and then it can be a stupid question eval use ob_start? I say that because, in eval if u have a Parse Error inside it will output it without really stop the script... eval doesn't change its behavior with this patch? If it makes no sense to you guys, simply ignore ;) -- Thanks for your attention, Diogo Neves Web Developer @ SAPO.pt by PrimeIT.pt ------=_Part_24546_12130764.1220474010151--