osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Warning: Cannot modify header information - Pls Help!!

This is a discussion on Warning: Cannot modify header information - Pls Help!! within the osCMax v1.7 Installation forums, part of the osCMax v1.7 Forums category; Hi all, After playing successfully offline on a local machine running a copy of MS2-Max-1.7 & ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v1.7 Forums > osCMax v1.7 Installation

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 05-21-2005, 04:08 PM
Lurker
 
Join Date: Apr 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
mightymidget
Default Warning: Cannot modify header information - Pls Help!!

Hi all,

After playing successfully offline on a local machine running a copy of MS2-Max-1.7 & XAMMP (all in one apache server) I decided to upload and install a clean copy to my Web-Host.

Everything was going great (thanks to the useful information in this forum & the great osCDox Guide). However when I now select 'My Account' or 'Checkout' functions from the 'Catalog' page I get the following error message:

Warning: Cannot modify header information - headers already sent by (output started at /home/linuxman/public_html/catalog/includes/languages/english.php:360) in /home/linuxman/public_html/catalog/includes/functions/general.php on line 29

I've not really modified much at all yet, only followed along with the installation guide and changed a few preferences from within Admin. Everything seemed to be going great, that was until I tried testing from a customers point of veiw.

I'd be really grateful if someone could help me out.

Many thanks in advance,

Andy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2  
Old 05-21-2005, 04:14 PM
Jonnyboy's Avatar
New Member
 
Join Date: May 2005
Location: Cambridge England
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Jonnyboy
Default RE: Warning: Cannot modify header information - Pls Help!!

Hi Andy

Have you made any cahnge to the /catalog/includes/languages/english.php file?
If you have can you post it here so we can check it out for you

Thanks
John
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 05-21-2005, 04:38 PM
Lurker
 
Join Date: Apr 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
mightymidget
Default

Hi John,

The only changes I've made to that file are to the Page Title:

// page title
define('TITLE', 'Linux-man Distros');

I've also changed this in the Catalog/includes/languages/english/index.php: define('HEADING_TITLE', 'Linux for Everyone!!');
so the Catalog page no longer displays 'Welcome to AAbox.com'

Other changes I've done have been through the Admin page, such as set the default curr to GBP and removed USD, Removed German, Spannish languages, and changed the permission on various files as directed by the installtion guide. Also through Admin I've changed the default template to osC.

That's it really. Unfortunately I don't know if the Account & Checkout function have ever worked as this is the first time I checked them.

Anything you can suggest would be appreciated. I really hope I can sort this out as the installation went like a dream.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 05-21-2005, 05:03 PM
Jonnyboy's Avatar
New Member
 
Join Date: May 2005
Location: Cambridge England
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Jonnyboy
Default

I found this when i did a google search... dont know if it will help but its worth a try...

search
"Warning: Cannot modify header information - headers already sent by" osc max

--------------------------------------------------------------------------
http://sourceforge.net/mailarchive/f...ewmonth=200505
------------------------------------------------------------------------------------------

Warning: Cannot add header information - headers already sent by (output
started at /directory/to/starting_file.php:XXX) in
/directory/to/calling_file.php on line XX


The problem occurs when content has been sent to the client and PHP has been
instructed to set header parameters via the header() function, or when
starting the session via the session_start() function.



Solution



The problem can be solved by walking through the code logic flow in the files
involved, which are mentioned in the warning message, to make sure no headers
are being set after content has been sent to the client.



A common cause to the problem is spaces ("whitespace") existing before the
first <?php tag and/or after the last ?> tag with the files involved. By
removing all spaces so that <?php is at the very start of the file and that ?>
is at the very end of the file, no content would have been sent to the client
and headers can be set safely.



Open the file in a text editor -> place your mouse cursor after the very last
?> tag at the very end of the file and press the "delete" key on your computer
keyboard. Make sure that whitespace does not exist before the opening <?php
tag at the very beginning of the file - delete whitespace if present. Save and
upload the file to your installation.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5  
Old 05-21-2005, 05:33 PM
Lurker
 
Join Date: Apr 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
mightymidget
Default

Thanks for finding that. Unfortunately it didn't fixed my problem. Still getting the same error. I haven't really changed that much from the default install so I'm totally stumpt.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #6  
Old 05-21-2005, 06:10 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,246
Thanks: 66
Thanked 294 Times in 280 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default

Quote:
/home/linuxman/public_html/catalog/includes/languages/english.php:360
That tells you exactly what the problem is. On line 360, you have white space after the closing php tag. Remove it and the error goes away. This is a php newbie error. Happens to everyone at least once...
__________________
Michael Sasek
osCMax Developer


osCMax Templates - Hundreds of premium quality templates. New designs every month!

xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience


osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
The Following User Says Thank You to michael_s For This Useful Post:
calistared (02-20-2008)
  #7  
Old 05-21-2005, 06:20 PM
Lurker
 
Join Date: Apr 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
mightymidget
Default

I checked all the files and couldn't find any spaces, went back and double checked and found loads!!!

It's all working now which is a real relief. So thanks everyone.

But one question, how did the spaces get there?? I've edited a number of these files, but so far all my edits haven't been anywhere near the closing php tags!!

Is it something to do with fact I'm editing these files directly on the server using my webhosts cPanelX control panel, or something else.

Once again many thanks for taking the time to sort this out for me

Andy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #8  
Old 05-22-2005, 12:38 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,246
Thanks: 66
Thanked 294 Times in 280 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default

It is because you are using a crappy editor that was not meant to edit code. The CPANEL web editor is not for anything other than wrecking your files

Use a real text editor that was meant for editing code (read : does not put any extra garbage into your files!)
__________________
Michael Sasek
osCMax Developer


osCMax Templates - Hundreds of premium quality templates. New designs every month!

xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience


osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread



Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Warning: Cannot modify header information - headers (...) grosnombril osCommerce 2.2 Installation Help 6 02-08-2005 01:04 AM
Modify this... tonic osCommerce 2.2 Modification Help 1 01-11-2005 08:19 AM
paypal ipn can't modify header information battleaxe osCMax v1.7 Discussion 0 06-06-2004 11:58 AM
header / header.php top logo problem the_error_king osCommerce 2.2 Modification Help 0 04-05-2004 05:02 PM
Warning: Cannot add header information Anonymous osCMax v1.7 Discussion 3 11-28-2003 04:33 PM


All times are GMT -8. The time now is 09:06 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
Copyright 2008 osCMax