Tuesday 21 November 2017

error reporting - PHP warning: headers already sent in Unknown





I'm looking for things that might trigger the following PHP
warning:




PHP
Warning: Cannot modify header

information - headers already sent
in
Unknown on line 0




Answer




Turned out that it was the
line



ob_start("ob_gzhandler");


that
caused the warning. This has been reported and fixed in 2001, it seems, but for some
reason it keeps coming back.



No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...