Page 1 of 1

Weird problem

Posted: Mon Feb 14, 2005 4:37 am
by danic
First of all, hello everybody!

I have a weird problem.
My website is hosted on an Apache server. It is entirely written in PHP+MySql.
However, I have a problem. I am writing a RSS feed for my site. Whatever I do, I have a 0x0A character at the begining of the output.
However, when I moved the rss generator in a subdirectory, everything worked fine.
Another example: On my forums: http://www.publionline.ro/forum/index.p ... =post&id=7 (sorry about the link). When you click an attached image, the output is generated again with a extra 0x0A character at the beginning. This prevents the image from loading. I've downloaded the output from that location, deleted the extra character and everything worked fine. The IPB forum was not modified in any way (no mods installed). I also mention that the images stored on disk (the uploaded images) are ok. Also, this problem appeared two weeks ago. The hosting company denies that this might be a miscobfiguration of their servers.

Does anyone know what could be the cause of this problem?
Please help me. Any ideas are welcome.

Thanks in advance!

Posted: Mon Feb 14, 2005 8:38 am
by feyd
possible sources:
  • there's a line break at the beginning of the script file handling it, it probably didn't show its ugly head earlier due to some configuration on the server
  • the server's header results have changed and are now outputting three carriage returns instead of two to terminate the header section. Check all your calls to header() to make sure they do not contain any line break characters.

Posted: Mon Feb 14, 2005 9:17 am
by danic
Indeed, @feyd.
Problem solved. I've added an extra ob_clean() before the print statement and everything seems to work just fine.

Can someone explain this to me?

Thanks!