Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Cannot modify header information


osc newbie

Recommended Posts

Posted

I have started my first osCommerce site, I installed FCK page editor using FCK Autoinstaller and PWA Autoinstaller, everything was going good then all of a sudden whenever I click on most of the buttons, such as checkout, my account, write review etc. all I get is a message saying: Warning: Cannot modify header information - headers already sent by (output started at /includes/languages/english.php:321) in /includes/functions/general.php on line 33. Can anyone help me out please.

Posted

I found the problem. I had left a space after the closing PHP tag ?> in the english.php file.

I realise now NO whitespaces are allowed before or after the opening and closing PHP tags (<?php . . . ?>)

Posted

Any text (including blanks) outside of the PHP code <?php ... ?> is sent "as is" to the browser. If HTTP headers have not already been sent for this page, whatever's been defined (or defaulted) is sent before the first text. This prevents osC from using the header() call to define any more headers after this. See my sig > FAQs > Cannot modify headers.

Posted

It should be noted that the closing ?> will "eat" a newline that immediately follows it (with no whitespace or anything else between it and the newline). But that's it.

Check out Chad's News.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...