#34071 [Opn-Fbk]: buffering is destroyed when using ob_gzhandler and ob_clean

2005-08-11 Thread sniper
 ID:   34071
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dennis at nocertainty dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Output Control
 Operating System: Windows XP SP2
 PHP Version:  5CVS-2005-08-10 (dev)
 New Comment:

1) Check your php.ini settings (how they differ to whatever you used as
base for your php.ini, -dist or -recommended)
2) Set error_reporting to E_ALL and try again..



Previous Comments:


[2005-08-11 20:54:56] dennis at nocertainty dot com

I found someone else who has the same problem as me:
http://www.sitepoint.com/forums/showpost.php?p=2093119postcount=5

However, I can't find any specific information. I looked through my
Apache error log, and the only thing I found was:

[Wed Aug 10 18:59:56 2005] [error] [client 127.0.0.1] request failed:
erroneous characters after protocol string: \\xff\\xfb\\x1f\\xff\\xfb
\\xff\\xfb\\x18\\xff\\xfb'\\xff\\xfd\\x01\\xff\\xfb\\x03\\xff\\xfd\\x03GET
/gzip2.php HTTP/1.0
[Wed Aug 10 19:00:21 2005] [error] [client 127.0.0.1] request failed:
erroneous characters after protocol string: \\xff\\xfb\\x1f\\xff\\xfb
\\xff\\xfb\\x18\\xff\\xfb'\\xff\\xfd\\x01\\xff\\xfb\\x03\\xff\\xfd\\x03GET
/gzip2.php HTTP/1.0

But I'm not sure if that's entirely relevant. But there's nothing more
that's related to it.



[2005-08-10 20:12:21] [EMAIL PROTECTED]

Then provide more info about it; look into the apache logs; try on
another server and with another PHP version etc etc.
As I've already said, it works perfectly here.



[2005-08-10 19:47:05] dennis at nocertainty dot com

Also, I disabled PHP4 in my http.conf file, and it still doesn't work
properly in PHP5Dev. So I still believe there's a bug in PHP5.



[2005-08-10 19:44:50] dennis at nocertainty dot com

Rasmus is right. The telnet thing works because ob_gzhandler doesn't do
anything. As soon as a specify a Content-Encoding: gzip header, nothing
gets displayed again. So it's not my browser that's causing the
problem.



[2005-08-10 19:21:08] [EMAIL PROTECTED]

Not PHP problem then.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/34071

-- 
Edit this bug report at http://bugs.php.net/?id=34071edit=1


#34071 [Opn-Fbk]: buffering is destroyed when using ob_gzhandler and ob_clean

2005-08-10 Thread tony2001
 ID:   34071
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dennis at nocertainty dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Output Control
 Operating System: Windows XP SP2
 PHP Version:  5CVS-2005-08-10 (dev)
 New Comment:

Can't reproduce.
Please try with PHP CLI and tell what SAPI you're using. 


Previous Comments:


[2005-08-10 18:08:20] dennis at nocertainty dot com

Description:

When using ob_start('ob_gzhandler') and ob_clean() the output buffer is
destroyed, and no ob_* function works anymore. It seems that PHP4 had
this problem as well (http://bugs.php.net/bug.php?id=29125)

Reproduce code:
---
?php
ob_start('ob_gzhandler');

echo 'Should NOT be shown';
ob_clean();
echo 'Should be shown';
?

Expected result:

Should be shown should've been printed, instead nothing is returned,
and nothing displays anymore.






-- 
Edit this bug report at http://bugs.php.net/?id=34071edit=1


#34071 [Opn-Fbk]: buffering is destroyed when using ob_gzhandler and ob_clean

2005-08-10 Thread tony2001
 ID:   34071
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dennis at nocertainty dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Output Control
 Operating System: Windows XP SP2
 PHP Version:  5CVS-2005-08-10 (dev)
 New Comment:

Still can't reproduce, even with FCGI.
Does this work for you:
?php
function foo($data) {
return $data;
}
ob_start('foo');
echo 'Should NOT be shown';
ob_clean();
echo 'Should be shown';
?
?


Previous Comments:


[2005-08-10 18:19:53] dennis at nocertainty dot com

It works with PHP CLI.

SAPI: cgi-fcgi



[2005-08-10 18:14:58] [EMAIL PROTECTED]

Can't reproduce.
Please try with PHP CLI and tell what SAPI you're using. 



[2005-08-10 18:08:20] dennis at nocertainty dot com

Description:

When using ob_start('ob_gzhandler') and ob_clean() the output buffer is
destroyed, and no ob_* function works anymore. It seems that PHP4 had
this problem as well (http://bugs.php.net/bug.php?id=29125)

Reproduce code:
---
?php
ob_start('ob_gzhandler');

echo 'Should NOT be shown';
ob_clean();
echo 'Should be shown';
?

Expected result:

Should be shown should've been printed, instead nothing is returned,
and nothing displays anymore.






-- 
Edit this bug report at http://bugs.php.net/?id=34071edit=1


#34071 [Opn-Fbk]: buffering is destroyed when using ob_gzhandler and ob_clean

2005-08-10 Thread tony2001
 ID:   34071
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dennis at nocertainty dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Output Control
 Operating System: Windows XP SP2
 PHP Version:  5CVS-2005-08-10 (dev)
 New Comment:

Are you sure there is nothing shown in the View Source tab?
I'm almost sure your browser just hides binary output from you. So try
this:
telnet localhost 80
GET /script.php HTTP/1.0
Enter
Enter



Previous Comments:


[2005-08-10 18:50:14] dennis at nocertainty dot com

Yes, that works. But as soon as I use ob_gzhandler, instead of foo,
nothing is displayed.

I run PHP4 and PHP5 at the same time (port 80 is PHP4.3.4, port 83 is
PHP5Dev). Could it be that the bug is caused by my PHP4 installation?



[2005-08-10 18:39:16] [EMAIL PROTECTED]

Still can't reproduce, even with FCGI.
Does this work for you:
?php
function foo($data) {
return $data;
}
ob_start('foo');
echo 'Should NOT be shown';
ob_clean();
echo 'Should be shown';
?
?



[2005-08-10 18:19:53] dennis at nocertainty dot com

It works with PHP CLI.

SAPI: cgi-fcgi



[2005-08-10 18:14:58] [EMAIL PROTECTED]

Can't reproduce.
Please try with PHP CLI and tell what SAPI you're using. 



[2005-08-10 18:08:20] dennis at nocertainty dot com

Description:

When using ob_start('ob_gzhandler') and ob_clean() the output buffer is
destroyed, and no ob_* function works anymore. It seems that PHP4 had
this problem as well (http://bugs.php.net/bug.php?id=29125)

Reproduce code:
---
?php
ob_start('ob_gzhandler');

echo 'Should NOT be shown';
ob_clean();
echo 'Should be shown';
?

Expected result:

Should be shown should've been printed, instead nothing is returned,
and nothing displays anymore.






-- 
Edit this bug report at http://bugs.php.net/?id=34071edit=1


#34071 [Opn-Fbk]: buffering is destroyed when using ob_gzhandler and ob_clean

2005-08-10 Thread tony2001
 ID:   34071
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dennis at nocertainty dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Output Control
 Operating System: Windows XP SP2
 PHP Version:  5CVS-2005-08-10 (dev)
 New Comment:

Then provide more info about it; look into the apache logs; try on
another server and with another PHP version etc etc.
As I've already said, it works perfectly here.


Previous Comments:


[2005-08-10 19:47:05] dennis at nocertainty dot com

Also, I disabled PHP4 in my http.conf file, and it still doesn't work
properly in PHP5Dev. So I still believe there's a bug in PHP5.



[2005-08-10 19:44:50] dennis at nocertainty dot com

Rasmus is right. The telnet thing works because ob_gzhandler doesn't do
anything. As soon as a specify a Content-Encoding: gzip header, nothing
gets displayed again. So it's not my browser that's causing the
problem.



[2005-08-10 19:21:08] [EMAIL PROTECTED]

Not PHP problem then.



[2005-08-10 19:20:43] [EMAIL PROTECTED]

That's not a very good test since ob_gzhandler checks the request's
accept-encoding and since your telnet test didn't specify that you
could accept gzip or deflate, then the gzhandler simply didn't do
anything.



[2005-08-10 19:03:27] dennis at nocertainty dot com

You're right, that works, and I get the correct result.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/34071

-- 
Edit this bug report at http://bugs.php.net/?id=34071edit=1