php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21294 register_shutdown_function output no compressed
Submitted: 2002-12-30 12:06 UTC Modified: 2003-07-15 17:51 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: brianlmoon@php.net Assigned:
Status: Not a bug Package: Output Control
PHP Version: 4.3.3RC2-dev OS: Linux 2.4.18
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: brianlmoon@php.net
New email:
PHP Version: OS:

 

 [2002-12-30 12:06 UTC] brianlmoon@php.net
register_shutdown_function now allow output.  However, this output is not compressed by zlib.output_compression.  It must be sent after the output buffer is flushed.  Mozilla will casually truncate the invalid parts.  However, IE will unpredictably stop loading the page and will sometimes not load the page at all.

In the below example, the output from the function shutdown_test will not be compressed.  You can see the test for yourself at http://dev.phorum.org/zlibtest.php

<?php

register_shutdown_function("shutdown_test");

?>

<html>
<head>
<title></title>
</head>
<body bgcolor="#ffffff" leftmargin="8" topmargin="8" marginheight="8" marginwidth="8">
This is in the HTML body.

</body>
</html>

<?php

function shutdown_test()
{
  echo "This is the shutdown function.";
}

?>

To see the raw output, You can try:

# wget -O - --header='Accept-Encoding: gzip' http://dev.phorum.org/zlibtest.php | less

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-15 17:51 UTC] sniper@php.net
Actually this is normal:

"The registered shutdown functions are called after the request has been completed (including sending any output buffers), so it is not possible to send output to the browser using echo() or print(), or retrieve the contents of any output buffers using ob_get_contents(). "

(what did you mean by "register_shutdown_function now allow output" anyway? Since when does it allow output??)

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 21 09:01:31 2024 UTC