Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2009
    Posts
    32
    Plugin Contributions
    0

    Default Error log : Cannot modify header information

    Hello all, I hope someone is kind enough to help.
    I downloaded the newest version of Zen Cart 2 days ago and have set up an online store at http://www.manavaeports.com
    I am having a problem when checking out on http://www.manavaeports.com/zc/index...ckout_shipping
    Basically it brings up a blank (only this "" in the corner) and will not continue to checkout.
    I have searched through all the posts here and on other sites that I can find an nothing is working for me. I have downloaded the Debug Error Logging file and received this error:

    [23-Apr-2009 05:04:35] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/content/n/o/g/nogameexports/html/zc/includes/classes/order.php:1) in /home/content/n/o/g/nogameexports/html/zc/includes/functions/functions_general.php on line 44

    Another post suggested that it had to do with blank spaces at the end of includes/languages/english/index.php but I have checked both my English and Japanese pages and have found nothing out of the ordinary.

    Long story short I am stumped and would greatly appreciate any help.


    Thank you in advance

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Error log : Cannot modify header information

    You appear to have garbage at the top of the file before the starting php tag <? ... you need to remove the garbage, space(s) and or blank line(s) that are there ...
    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!

  3. #3
    Join Date
    Apr 2009
    Posts
    32
    Plugin Contributions
    0

    Default Re: Error log : Cannot modify header information

    Thank you for your answer, could you tell me which file I should be looking at? I looked at both the index.php file and the functions_general.php file and found no blank spaces in either file.

    Thank you again!

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Error log : Cannot modify header information

    The error says:
    [23-Apr-2009 05:04:35] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/content/n/o/g/nogameexports/html/zc/includes/classes/order.php:1) in /home/content/n/o/g/nogameexports/html/zc/includes/functions/functions_general.php on line 44
    Fix this one, then see if you have other errors to fix ...
    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!

  5. #5
    Join Date
    Apr 2009
    Posts
    32
    Plugin Contributions
    0

    Default Re: Error log : Cannot modify header information

    OK, so I went into the order.php file as you suggested and found nothing in the way of blank spaces, empty lines or garbage before the <? BUT I did a little searching by the Developers Tool Kit and some more research on the  marking that was showing up: For anyone who is having this same problem and is a PHP noob like me, it is called the 'Byte Order Mark' or BOM and can be caused by several things including the charset utf-8 in your content-type meta... several sources state that I must use iso-8859-1 BUT I tried this (even though Japanese characters require utf-8) and the problem persisted. After using the Developers Tool Kit and searching for , I found these files contain that mark at Line 0 (0?? how in the world could it be on a non-line?):

    /includes/classes/order.php
    /includes/languages/japanese/modules/payment/cc.php
    /includes/languages/japanese/modules/payment/paypal.php

    So, you are spot on that order.php does in fact have garbage in the form of this mark in the file before <? BUT... and this is the frustrating part, when I open it with Dreamweaver there is obviously no Line 0 and no garbage, spaces etc to be cleaned up. How can I get at that Line 0 or if you know a tool or setting in Dreamweaver or other editor (Notepad does not show the BOM either) I have turned on Hidden Characters but nothing. I think once that BOM is removed that it will fix the problem, the question is how can it be done (I would also be really interested in finding out how it got there in the first place so others who read this can avoid this problem in the future)

    Once again you are awesome, thank you for your help
    Last edited by gingabox; 24 Apr 2009 at 07:33 AM.

  6. #6
    Join Date
    Apr 2009
    Posts
    32
    Plugin Contributions
    0

    Default Re: Error log : Cannot modify header information

    yay I fixed the Byte Order Mark! (still getting a blank page at checkout but I will go through the Debug and check that out.
    For anyone else having this problem... the problem can be in one of these locations: NOTE!! This is for those who are using other languages that require utf-8 encoding... if you arent then these setting could cause other problems

    includes/languages/english.php
    admin/includes/languages/english.php
    includes/classes/db/mysql/query_factory.php

    If you have not correctly set the utf-8 encoding in these pages you will in fact get a BOM.

    Other problem spot can be in the Database itself... use phpAdmin and ensure that your MySQL connection collation is set to utf8_general_ci

    That should clear up your BOM mark error and then you can go on to fixing other problems

  7. #7
    Join Date
    Apr 2009
    Posts
    32
    Plugin Contributions
    0

    Default Re: Error log : Cannot modify header information

    One more thing for others who have this problem... I corrected the order.php file by manually making the adjustments to the orders.php and functions_general file... more info on this can be found here

    http://www.srw2d.com/content/orderphp

    and thank you for your help again, Ajeh, I really appreciate it! If you wouldn't have pointed me in the direction away from every thing else I was reading about this problem I would have never found my solution. Every other thread I could find (here and on other sites) had people looking in index.php and other areas that were not specific to this problem with Japanese encoding.

 

 

Similar Threads

  1. Cannot Modify Header Information Error
    By acmc40 in forum General Questions
    Replies: 5
    Last Post: 14 Dec 2008, 06:28 PM
  2. Error: Cannot modify header information
    By BradSmith in forum Templates, Stylesheets, Page Layout
    Replies: 14
    Last Post: 26 Mar 2008, 07:27 PM
  3. Keep getting this error: Cannot Modify Header Information
    By Dreameffects in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 8 Jan 2008, 01:15 AM
  4. Installation Error - Cannot Modify Header Information
    By jwbaker in forum Installing on a Linux/Unix Server
    Replies: 5
    Last Post: 19 May 2006, 06:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg