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: 2021-11-14 04:22 UTC
From: lior dot k at zend dot com Assigned: cmb (profile)
Status: No Feedback Package: Apache2 related
PHP Version: 5.4.9 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: lior dot k at zend dot com
New email:
PHP Version: OS:

 

 [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.
 [2017-10-24 06:34 UTC] kalle@php.net
-Status: Assigned +Status: Open -Assigned To: mike +Assigned To:
 [2021-11-02 13:25 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-11-02 13:25 UTC] cmb@php.net
That script works fine for me with PHP-7.4.  Can anybody else
still reproduce the reported behavior with any of the actively
supported PHP versions[1]?

[1] <https://www.php.net/supported-versions.php>
 [2021-11-14 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 20:01:28 2024 UTC