i have a site, where i buffer some output with
ob_start();
...
and it worked fine until today i updated my debian from an older php5.3 to the latest php5.3.3-7+squeeze8
Now i sometimes have something in the output buffer before i call it the first time
please don't answer things like
"header must be called before any output is sent." (I know, I work a lot with output buffers)
when i set an extra ob_get_clean(); at the very first line of my script, it works
<?
ob_get_clean();
it seems, like php is creating some output beforehand if i put the first line
<? print_r(ob_get_clean()); ?>
then i see, that there is an empty string already in the buffer:
""
on all other pages it isn't, there ob_get_clean(); contains
null
is it possible you have some " " in front of your
<?php
somewhere? or wrong file encoding issue its usually some kind of that nature, check your files and include files.perhaps a case of BOM character? more info here
i found it:
i had no invisible character in front, it was something different: i called ob_end_clean() one time too much:
this was my code, inside a function i call:
it seems, that you can clear your main output buffer ;)
It'll be much easier if you give us some info about that mysterious data.