Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40222 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6958 invoked from network); 2 Sep 2008 22:30:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Sep 2008 22:30:56 -0000 Authentication-Results: pb1.pair.com header.from=arnaud.lb@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=arnaud.lb@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.190 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: arnaud.lb@gmail.com X-Host-Fingerprint: 209.85.128.190 fk-out-0910.google.com Received: from [209.85.128.190] ([209.85.128.190:64378] helo=fk-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F6/59-33714-F9EBDB84 for ; Tue, 02 Sep 2008 18:30:56 -0400 Received: by fk-out-0910.google.com with SMTP id 18so2008925fks.7 for ; Tue, 02 Sep 2008 15:30:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:cc:references:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:message-id; bh=+FhmGn6arZQTK6qOWz1tGoLDuTxPslYBw/YPicMjZaE=; b=o6TkqpWZ3X9UIWIcWoOgfOCh/tvEPsX1RS4DiXpMjnC19MlZa6ZsRH3fdO5PXdHpCc PI5GWmWHkUuCbzBtbIOXyMND6IGD2QzvDuKO2Gon+hCEztkYocI4w8p59XiJ0QiIHVCc sy5NoG/JJC7pUW71/cISbAkYvc/FymX0YmyG4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:message-id; b=UETdl1hhFClwrkhrPg4QRUQFdqWi3VmEp0FlYcbA4dyCN1XKbUh2UMrxIuG3bToydQ msKxDYehf4s9goY6fnsgq8PZCMhKhszGn/nhLL5ZMJt8wUbhaN3Yj9CjKd8VDETr/3Wh MF128Z3LI3SJg2oY36q5wbY9F+3cvG1aopHYE= Received: by 10.181.22.8 with SMTP id z8mr6438145bki.78.1220394652547; Tue, 02 Sep 2008 15:30:52 -0700 (PDT) Received: from 207-177-41-213.getmyip.com ( [213.41.177.207]) by mx.google.com with ESMTPS id p17sm7366930fka.14.2008.09.02.15.30.49 (version=SSLv3 cipher=RC4-MD5); Tue, 02 Sep 2008 15:30:51 -0700 (PDT) To: Dmitry Stogov Date: Wed, 3 Sep 2008 00:30:47 +0200 User-Agent: KMail/1.10.0 (Linux/2.6.26-1-amd64; KDE/4.1.0; x86_64; ; ) Cc: jani.taskinen@iki.fi, Lukas Kahwe Smith , Marcus Boerger , Stanislav Malyshev , PHP Internals List References: <48BCFF84.9080801@zend.com> <48BD0A53.2030202@sci.fi> <48BD1226.5010902@zend.com> In-Reply-To: <48BD1226.5010902@zend.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-ID: <200809030030.48091.arnaud.lb@gmail.com> Subject: Re: [PHP-DEV] BUG #45392 From: arnaud.lb@gmail.com (Arnaud Le Blanc) 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=45392 for > >>>> 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