osc newbie Posted July 14, 2010 Posted July 14, 2010 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.
osc newbie Posted July 14, 2010 Author Posted July 14, 2010 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 . . . ?>)
MrPhil Posted July 14, 2010 Posted July 14, 2010 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.
chadcloman Posted July 15, 2010 Posted July 15, 2010 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.