Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    May 2008
    Posts
    6
    Plugin Contributions
    0

    Default Warning: Cannot modify header information - Error during checkout

    Hi,

    A client of mine has recently discovered the following error during the checkout order processing step:

    When you click to finalize your order on the checkout confirmation page, the application hangs with the following error:

    Warning: Cannot modify header information - headers already sent by (output started at /html/includes/classes/order.php:389) in /html/includes/functions/functions_general.php on line 44

    I've poked around the forums and seen others refer to a fix involving extra spaces in /includes/languages/english/index.php, but I don't have anything extra in said file. This error seems to have come from nowhere. The client swears they haven't touched the site files, so I have no clue where to start looking for mods. Any help is greatly appreciated.

    Many thanks,
    Alex

  2. #2
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,975
    Plugin Contributions
    0

    Default Re: Warning: Cannot modify header information - Error during checkout


  3. #3
    Join Date
    May 2008
    Posts
    6
    Plugin Contributions
    0

    Default Re: Warning: Cannot modify header information - Error during checkout

    thanks; i've looked at the file reporting the error (/includes/classes/order.php) but find no extra spaces, unclosed quotes, or echo/print statements. I went ahead and replaced order.php with my backup just to make sure, and I still get the error. (just to note, I haven't at any point touched the files that are causing the error).

    Oddly enough, orders are still being processed, email confirmations are still being sent out, but the success page will not show up. I've gone back through the checkout process and also discovered the same error ("header information already sent by....") in checkout_shipping_address.php; I checked that file and again nothing was awry.

    i've replaced both files with the originals now, and i'm still not able to complete checkout. Any further help is greatly appreciated.

    Thanks again,
    Alex

  4. #4
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Warning: Cannot modify header information - Error during checkout

    You might want to get a log of the errors being encountered, by following step 2a of this FAQ: https://www.zen-cart.com/tutorials/index.php?article=82
    .

    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.

  5. #5
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Warning: Cannot modify header information - Error during checkout

    Warning: Cannot modify header information - headers already sent by (output started at /html/includes/classes/order.php:389) in /html/includes/functions/functions_general.php on line 44

    You should be looking at the above two files for any extra white space or other problems, instead of the 'index.php' file.

    Specifically: /html/includes/classes/order.php and line 389.

  6. #6
    Join Date
    May 2008
    Posts
    6
    Plugin Contributions
    0

    Default Re: Warning: Cannot modify header information - Error during checkout

    thanks, Rob; I have looked at the indicated file (order.php), and have replaced it with a backup from my original zen cart download, but to now avail. I hadn't modified that class to begin with but replaced it just to make sure.

    I've also gone through every file in /includes/languages/english relating to checkout and there were no white space issues (i hadn't modified these either but wanted to make sure).

    do i need to update or re-install zen cart? as best i can figure this happened when my client moved the site from the staging area to the live area of their server.

    thanks again,
    alex

  7. #7
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Warning: Cannot modify header information - Error during checkout

    When you say "moved" from the staging area, how exactly was that done? It is not uncommon and for various reasons, for FTP failures in uploading. Especially when doing many, many files such as uploading all Zen Cart files -- around 1,700.

    Also, try the suggestion by DrByte.

  8. #8
    Join Date
    May 2008
    Posts
    6
    Plugin Contributions
    0

    Default Re: Warning: Cannot modify header information - Error during checkout

    I have followed Dr. Byte's suggestion; this was the result I got (from previous post). The debug utility did not write anything to my cache folder so I ended up using the STRICT errors method.

    Quote Originally Posted by alxklo View Post
    Oddly enough, orders are still being processed, email confirmations are still being sent out, but the success page will not show up. I've gone back through the checkout process and also discovered the same error ("header information already sent by....") in checkout_shipping_address.php; I checked that file and again nothing was awry.

    anything else that may cause this? is the best solution at this point to run diff on the staging and live areas of the site?

    thanks,
    Alex

  9. #9
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Warning: Cannot modify header information - Error during checkout

    performing a diff comparison is a logical next step.

    Additionally, the method you used to do the move is important. Sometimes zipping and unzipping can cause files to become double-spaced due to line-ending changes in every file using that method. This can even happen with some FTP programs. If conflicting line-endings get set, you can get the headers-already-sent situation in weird places because it really is finding extra blank lines in the middle of things.
    .

    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.

  10. #10
    Join Date
    May 2008
    Posts
    6
    Plugin Contributions
    0

    Default Re: Warning: Cannot modify header information - Error during checkout

    OK, so I've done a diff comparison of the files in the include folder in my site and the latest version of zen cart (1.38), corrected any extra breaks or spaces I found, and uplaoded the new files to the site. Now when I use STRICT error reporting, I don't get any specific errors during the checkout process.

    HOWEVER, I still get the internal server error page when I confirm my order. Any thing else I should try before starting from scratch or consulting a third party?

    Thanks,
    Alex

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Google Checkout - Warning: Cannot modify header information
    By maorlv in forum Addon Payment Modules
    Replies: 0
    Last Post: 9 Mar 2011, 07:23 PM
  2. Warning: Cannot modify header information
    By jimh3768 in forum General Questions
    Replies: 6
    Last Post: 21 Feb 2010, 04:09 PM
  3. Replies: 1
    Last Post: 12 Dec 2008, 07:00 AM
  4. Warning: Cannot modify header information
    By chrisj in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 25 Aug 2006, 11:04 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR