Forums / Templates, Stylesheets, Page Layout / Error: Cannot modify header information

Error: Cannot modify header information

Locked

Views: 2,798

Results 1 to 15 of 15
This thread is locked. New replies are disabled.
28 Sep 2007, 8:40 PM
#1
bradsmith avatar

bradsmith

New Zenner

Join Date:
Jan 2007
Posts:
50
Plugin Contributions:
0

Error: Cannot modify header information

This is weird... the store was working fine, but somehow I must have changed something. Some products show up just fine, while other products give me this error :

Warning: Cannot modify header information - headers already sent by (output started at /home/vhosts/rickrushart.com/public_html/includes/languages/english/extra_definitions/CustomFeatured_sidebox_defines.php:31) in /home/vhosts/rickrushart.com/public_html/includes/functions/functions_general.php on line 44

Now, I recognize the "CustomFeatured_sidebox" as the "Rick's Recent Works" table, which I added a graphic to in replace of text in the box header, but I didn't notice any errors until after I moved a product from it's own category to a new one.

Can anyone help out?

The website is, https://www.RickRushArt.com
The Hockey product works fine, but the products in the Racing category do not.

Brad Smith, Serigraph Printer
https://www.RickRushArt.com

28 Sep 2007, 8:54 PM
#2
bradsmith avatar

bradsmith

New Zenner

Join Date:
Jan 2007
Posts:
50
Plugin Contributions:
0

Re: Error: Cannot modify header information

Okay, I removed the...

/public_html/includes/languages/english/extra_definitions/CustomFeatured_sidebox_defines.php

...and now the pages seem to work okay, except the 'Custom Sidebox' header says, "
BOX_HEADING_CUSTOMFEATURED_SIDEBOX"...

Brad Smith, Serigraph Printer
https://www.RickRushArt.com

28 Sep 2007, 9:00 PM
#3
bradsmith avatar

bradsmith

New Zenner

Join Date:
Jan 2007
Posts:
50
Plugin Contributions:
0

Re: Error: Cannot modify header information

Somehow there's a communication breakdown, whenever I add the defines PHP back into the folder...

<?php // // CustomFeatured Sidebox Mod // includes/modules/sideboxes/CustomFeatured_sidebox_defines.php define('BOX_HEADING_CUSTOMFEATURED_SIDEBOX', 'Recent works'); ?>

Nothing looks wrong, here, though... so why would adding this file to the location suddenly cause specific products not to work, but other specific products still work perfectly fine?

Brad Smith, Serigraph Printer
https://www.RickRushArt.com

28 Sep 2007, 9:15 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Error: Cannot modify header information

Your first error sounds like you have space(s) or blank line(s) at the end of the file below the closing php tag ?> which sends the error message about:
Warning: Cannot modify header information - headers already sent by

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

28 Sep 2007, 9:22 PM
#5
bradsmith avatar

bradsmith

New Zenner

Join Date:
Jan 2007
Posts:
50
Plugin Contributions:
0

Re: Error: Cannot modify header information

...wow... I went into the file and deleted a single space, uploaded it back, and now it appears to be working.

It was literally a SINGLE space. Not even interrupting anything.

Brad Smith, Serigraph Printer
https://www.RickRushArt.com

28 Sep 2007, 9:26 PM
#6
bradsmith avatar

bradsmith

New Zenner

Join Date:
Jan 2007
Posts:
50
Plugin Contributions:
0

Re: Error: Cannot modify header information

Well, I just put the img line back to the header spot, and it works perfectly fine. I cannot believe that tiny space totally fried half of the products. Thanks a million and a million.

Brad Smith, Serigraph Printer
https://www.RickRushArt.com

29 Sep 2007, 1:38 AM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Error: Cannot modify header information

Amazing things what a single typo or space can do to a program, eh? :lamo:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

2 Oct 2007, 2:12 AM
#8
panqueconpasas avatar

panqueconpasas

New Zenner

Join Date:
Sep 2007
Posts:
4
Plugin Contributions:
0

Re: Error: Cannot modify header information

Ajeh:

Your first error sounds like you have space(s) or blank line(s) at the end of the file below the closing php tag ?> which sends the error message about:
Warning: Cannot modify header information - headers already sent by

So simple, yet such a mind boggler to us php newbies...

26 Mar 2008, 4:38 PM
#9
traquau avatar

traquau

New Zenner

Join Date:
Mar 2008
Posts:
11
Plugin Contributions:
0

Re: Error: Cannot modify header information

Ajeh:

Your first error sounds like you have space(s) or blank line(s) at the end of the file below the closing php tag ?> which sends the error message about:
Warning: Cannot modify header information - headers already sent by

Sorry for repeat the same problem, but I can firuge out how to solve it now.
I met the same problem decribed above before, anh some time I solve it successfully by this guidline , but right now the same problem occur ( with another file ) and I do the same, check this file carefully on local , upload it to server and it still..not working . I don't know why ?

Love Z-Commerce so much
Khoa Huynh.

City24Mart

26 Mar 2008, 4:45 PM
#10
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,684
Plugin Contributions:
0

Re: Error: Cannot modify header information

What are you using to edit and then upload your files?

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

26 Mar 2008, 4:53 PM
#11
traquau avatar

traquau

New Zenner

Join Date:
Mar 2008
Posts:
11
Plugin Contributions:
0

Re: Error: Cannot modify header information

Kim:

What are you using to edit and then upload your files?
I use FileZilla as recommeded .

Love Z-Commerce so much
Khoa Huynh.

City24Mart

26 Mar 2008, 5:07 PM
#12
traquau avatar

traquau

New Zenner

Join Date:
Mar 2008
Posts:
11
Plugin Contributions:
0

Re: Error: Cannot modify header information

And edit with Notepad , save with utf-8 format.

Love Z-Commerce so much
Khoa Huynh.

City24Mart

26 Mar 2008, 5:10 PM
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Error: Cannot modify header information

traquau:

the same problem occur ( with another file )If it keeps happening with different files, you'll have to deal with each file until the errors stop.

Related FAQ:
https://www.zen-cart.com/tutorials/index.php?article=87

If your files are double-spaced, then your FTP program may be translating line-endings incorrectly. Or maybe your files have been damaged by a different FTP program somehow. Sometimes it's easier to start with a fresh set of original files.

You might try using Notepad++, which is more usable than regular Notepad.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

26 Mar 2008, 5:50 PM
#14
traquau avatar

traquau

New Zenner

Join Date:
Mar 2008
Posts:
11
Plugin Contributions:
0

Re: Error: Cannot modify header information

traquau:

I use FileZilla as recommeded .

DrByte:

If it keeps happening with different files, you'll have to deal with each file until the errors stop.

Related FAQ:
https://www.zen-cart.com/tutorials/index.php?article=87

If your files are double-spaced, then your FTP program may be translating line-endings incorrectly. Or maybe your files have been damaged by a different FTP program somehow. Sometimes it's easier to start with a fresh set of original files.

You might try using Notepad++, which is more usable than regular Notepad.

Thanks Dr Byte
Already go through these suggestion , but the problem still there.
I try to upload the original file , this work fine . The problem began when I convert this file to local language ( which need to save in utf-8 ) format . Do you think the problem because utf-8 format ?

Love Z-Commerce so much
Khoa Huynh.

City24Mart

26 Mar 2008, 6:27 PM
#15
traquau avatar

traquau

New Zenner

Join Date:
Mar 2008
Posts:
11
Plugin Contributions:
0

Re: Error: Cannot modify header information

traquau:

Thanks Dr Byte
Already go through these suggestion , but the problem still there.
I try to upload the original file , this work fine . The problem began when I convert this file to local language ( which need to save in utf-8 ) format . Do you think the problem because utf-8 format ?

Hi All
I think I have solved this problem now and I think it helful in case of someone need localize language in utf-8 format . I don't know why , but when we use Notepad++ as Mr Byte suggested ( thanks very much for your suggestion ) and save file with option **"Encode in UTF-8 without BOM" ** , everything is OK.

Now I need open all my files with Noteplus and save again , take time but I am happy . o:)

Love Z-Commerce so much
Khoa Huynh.

City24Mart