php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63788 phpt for #51822 fails when run through Apache (works in CLI/FCGI)
Submitted: 2012-12-17 12:52 UTC Modified: 2012-12-19 14:58 UTC
From: lior dot k at zend dot com Assigned: mike
Status: Assigned Package: Apache2 related
PHP Version: 5.4.9 OS: Linux
Private report: No CVE-ID:
Have you experienced this issue?
Rate the importance of this bug to you:

 [2012-12-17 12:52 UTC] lior dot k at zend dot com
Description:
------------
Running bug51822.phpt doesn't give the expected result on PHP 5.4 when running as an Apache module, works fine as CLI/FCGI. Checked with PHP 5.4.4 on Debian and PHP 5.4.9 on a private build.

PHP 5.3.19 works fine.


Test script:
---------------
bug51822.phpt from the PHP.net sources (http://git.php.net/?p=php-src.git;a=blob;f=Zend/tests/bug51822.phpt;)



Expected result:
----------------
phpt expected output:
bla
1
2

Actual result:
--------------
PHP 5.4 output:
bla
1

PHP 5.3 output:
bla
1
2

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-12-19 14:02 UTC] lior dot k at zend dot com
The distrustor does work, but the output buffer is already closed, and this is why the extra output doesn't appear.

This can be seen easily by replacing the echo command with something like `date > /tmp/bla`; 

Also happens in Zend/tests/bug38779_1.phpt
 [2012-12-19 14:33 UTC] laruence@php.net
-Assigned To: +Assigned To: laruence
 [2012-12-19 14:58 UTC] laruence@php.net
-Assigned To: laruence +Assigned To: mike
 [2012-12-19 14:58 UTC] laruence@php.net
mike, could you please look at this?

the latter destructor is called via zend_deactivate, but at this
time , the output is deactived.
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Tue Aug 29 15:01:52 2017 UTC