Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
In my index file I am getting this on adding couch editables:

Warning: Cannot modify header information - headers already sent by (output started at /nfs/c01/h09/mnt/12939/domains/abc.com/html/SF/abc_04-01/index.php:1) in /nfs/c01/h09/mnt/12939/domains/abc.com/html/SF/abc_04-01/couch/cms.php on line 376

I checked the cms.php file and it has this line of code at line 376: header( $content_type_header );

What does this mean? Why is the error coming?
Edit: This error is not seen in other php files which also have the header called/included. I see this error only in the index file
Hi,

There is an entire thread dedicated to this problem - viewtopic.php?f=4&t=53

From what you explained, it seems to be the BOM problem.
Please try the solutions suggested in the mentioned thread and let us know how it goes.

Hope it helps.
Yes that solved. Thanks. How does the encoding pose issues and why are the same issues not encountered in other files in the project and only the index file?
How does the encoding pose issues
As explained in the thread I alluded to, a 'UTF with BOM' encoding adds two bytes as 'Bytes Order Markers' at the very beginning of the file. These bytes are invisible as text but nevertheless mess up PHP's buffering, as you experienced.

why are the same issues not encountered in other files in the project and only the index file?
That is most likely because only the index file happened to be UTF encoded with BOM - rest of the templates were either UTF without BOM or plain ASCII.

Hope that answers your query.
4 posts Page 1 of 1
cron