|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-01-31 09:15 UTC] aboldt at boldtconsult dot com
When enabling output_handler = ob_gzhandler in php.ini, my Linux system starts to eat more and more memory in an unusual way, like there was a memory leak, like many people have reported. But what is absolutely weird is that after enabling ob_gzhandler, I start to get this error messages in my log files: Cannot add header information - headers already sent in Unknown on line 0 Which is weird, because one of the features of output buffering is to avoid that kind of problems. What's even more weird is that I don't get any "headers already sent" messages with output_handler = ob_gzhandler disabled! PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 18:00:01 2025 UTC |
I've just found out what the problem is, and it's kind of weird: With ob_gzhandler enabled (from php.ini or with ob_start("ob_gzhandler") in the .php) each readfile() makes the "Cannot add header information - headers already sent" error message appear. This doesn't happen with output buffering enabled and no ob_gzhandler, it only happens with ob_gzhandler enabled. Also tried to replace readfile with fpassthru(fopen()) but got the same result. Hope this helps you fix the problem. If you have any questions feel free to ask, I've been experimenting quite a lot.