Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40211 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89252 invoked from network); 2 Sep 2008 10:15:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Sep 2008 10:15:09 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.163 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 212.25.124.163 il-gw1.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.163] ([212.25.124.163:19004] helo=il-gw1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8C/22-10645-A221DB84 for ; Tue, 02 Sep 2008 06:15:08 -0400 Received: from ws.home ([10.1.1.1]) by il-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 2 Sep 2008 13:16:10 +0300 Message-ID: <48BD1226.5010902@zend.com> Date: Tue, 02 Sep 2008 14:15:02 +0400 User-Agent: Thunderbird 2.0.0.16 (X11/20080723) MIME-Version: 1.0 To: jani.taskinen@iki.fi CC: Arnaud Le Blanc , Lukas Kahwe Smith , Marcus Boerger , Stanislav Malyshev , PHP Internals List References: <48BCFF84.9080801@zend.com> <48BD057A.9090007@sci.fi> <48BD0746.8070103@zend.com> <48BD0A53.2030202@sci.fi> In-Reply-To: <48BD0A53.2030202@sci.fi> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 02 Sep 2008 10:16:11.0083 (UTC) FILETIME=[EC2711B0:01C90CE4] Subject: Re: [PHP-DEV] BUG #45392 From: dmitry@zend.com (Dmitry Stogov) 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". > 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 >