Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
I am getting the infamous "cannot modify header information" error.

Here is the full error:
Code: Select all
Cannot modify header information - headers already sent by (output started at /home2/kcsnuff/public_html/header.php:14) in /home2/kcsnuff/public_html/bfwadmin/cms.php on line 369


This error is causing the formatting of my page to mess up. I went to line 369 in cms.php and commented it out to see what would happen, it solved the previous error.. but when I tried to do anything relating to the cart, I would get these errors:

Code: Select all
Warning: Cannot modify header information - headers already sent by (output started at /home2/kcsnuff/public_html/header.php:14) in /home2/kcsnuff/public_html/bfwadmin/addons/cart/cart.php on line 602

Warning: Cannot modify header information - headers already sent by (output started at /home2/kcsnuff/public_html/header.php:14) in /home2/kcsnuff/public_html/bfwadmin/addons/cart/cart.php on line 603

Warning: Cannot modify header information - headers already sent by (output started at /home2/kcsnuff/public_html/header.php:14) in /home2/kcsnuff/public_html/bfwadmin/addons/cart/cart.php on line 604

Warning: Cannot modify header information - headers already sent by (output started at /home2/kcsnuff/public_html/header.php:14) in /home2/kcsnuff/public_html/bfwadmin/addons/cart/cart.php on line 605


I have tried this solution, but all of my files seem to be encoded without BOM already...

I am currently loading a header and footer with php on all my pages, if that is any important information.


Would love to get this problem solved ASAP as a client is on the line!

Thanks :)
Hi and welcome :)

The error messages clearly state - output started at /home2/kcsnuff/public_html/header.php:14.

The 'header.php' mentioned does not belong to Couch so we'll have to take a look at what it is doing to cause the error.

Can you please paste in (or attach or PM) -
1. The said 'header.php'.
2. The Couch managed template where you are including the 'header.php'.

Thanks.
Thanks.
I am quoting from your PM
Here is how the header is being included...

<?php require_once ( 'header.php' ); ?>
<?php require_once( 'couch/cms.php' ); ?>
<cms:template title='Products' />

As I suspected, you are including the 'header.php' before 'cms.php' which really should be the very first file to be included.

I think if you make the sequence as follows, it would solve the problem -
Code: Select all
<?php require_once( 'couch/cms.php' ); ?>
<?php require_once ( 'header.php' ); ?>
<cms:template title='Products' />

Hope this helps. Please let us know.
3 posts Page 1 of 1