You are here:  » Error: Cannot modify header information

Support Forum



Error: Cannot modify header information

Submitted by dukerev on Wed, 2008-10-22 09:12 in

I changed the value for $config_title in the file config.php

Now I get this error message on all my pages:
Warning: Cannot modify header information - headers already sent by (output started at /home/pricebot/public_html/config.php:1) in /home/pricebot/public_html/html/header.php on line 6

I went to change the tile back to what it was before, but I still get the same message. I replaced the header.php back to its original and that didn't help.

Any ideas on how to fix this?

Submitted by support on Wed, 2008-10-22 09:34

Hi,

This just means that some white space has got into config.php, so PHP has started the output too early. To fix this, just open config.php in your text editor, and delete everything outside of the PHP tags. Check the beginning and the end of the file to make sure there are no SPACES or new lines - that will be all it is!

Cheers,
David.

Submitted by dukerev on Wed, 2008-10-22 09:52

There was a new line on the very end of the file of config.php and I removed it.

However, I'm still getting the same error.

Submitted by support on Wed, 2008-10-22 10:43

Hi,

The error message is indicating that the new line (or a SPACE) is at the top of config.php (line 1 according to the message) - can you have another check and make sure that the first character in the file is the < of <?php...

Cheers,
David.

Submitted by dukerev on Thu, 2008-10-23 06:59

I'm pretty sure I got rid of all the spaces.

http://pricebot.ca/html/temp.jpg

I'm thinking about reinstalling and starting from scratch.

Submitted by support on Thu, 2008-10-23 07:30

Hi,

I think it is a character set issue - I have just tried to browse to config.php on your site, and you see this:

http://pricebot.ca/config.php

...but it should be completely blank. This means that some character encoding control characters have been put at the front of config.php, I think by your text editor. Can you see if your editor has an option to change the character set; and then make sure it is "UTF-8"?

If you're still not sure, feel free to email me your config.php and i'll check it out for you...

Cheers,
David.

Submitted by dukerev on Thu, 2008-10-23 07:46

You there right there was a - at the beginning of the file. Thank you

Do you suggest a text editor other than notepad?

Submitted by support on Thu, 2008-10-23 10:19

Hi,

It's a long time since I did my development on Windows, but when I did; I used a commercial product called Ultra Edit:

http://www.ultraedit.com/

I'm sure there are some good quality free editors that people are using - so someone else may be able to recommend something...

Cheers,
David.