Results 1 to 10 of 14

Hybrid View

  1. #1
    Join Date
    Apr 2006
    Location
    Dark Side of the Moon
    Posts
    987
    Plugin Contributions
    1

    Default Headers Already Sent

    I could use some help trying to track down this error:

    [27-Apr-2011 12:46:08] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/***/public_html/includes/templates/template_default/common/html_header.php:22) in /home/***/public_html/includes/functions/functions_general.php on line 45
    I have spent many hours trying to find the culprit, and just cannot seem to find it. I have looked for the extra spaces before/after in all my header_php.php files to no affect. I've tried to reproduce the error browsing through my site and hitting all the major pages and still no go. Yet I still get 6 to 10 of these debug logs a day.

    Yes, I have read the wiki entry on this, but those suggestions have not helped.

    Zencart 1.3.9h

    Thanks! Hope someone has an idea.

  2. #2
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    6,196
    Plugin Contributions
    0

  3. #3
    Join Date
    Apr 2006
    Location
    Dark Side of the Moon
    Posts
    987
    Plugin Contributions
    1

    Default Re: Headers Already Sent

    Quote Originally Posted by haredo View Post
    have you read this in the tutorial section..
    Yes, that's what I mistakenly called the wiki entry

  4. #4
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Headers Already Sent

    It means you've got something doing "output" on line 22 of /includes/templates/template_default/common/html_header.php



    Moving this out of the Bug Reports section, since it's not a core bug of ZC.
    .

    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
    Apr 2006
    Location
    Dark Side of the Moon
    Posts
    987
    Plugin Contributions
    1

    Default Re: Headers Already Sent

    Well, this IS an unmodified core file.

    Line in question:

    <html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>>
    Could these error be produced by some form a hack/sql injection ???

    These errors are occurring on a site without any user login, or checkout (royal industries inc <dot> com). I can browse through all the main pages of the site and NOT generate this error, yet I still get several of them every day. If I can't trigger the error myself, how am I ever going to track down the cause.

    Some direction on what I need to do would be appreciated.

    thanks

  6. #6
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    6,196
    Plugin Contributions
    0

    Default Re: Headers Already Sent

    Use the free program called Winmerge to compare the two html_header.php files side by side.
    You will compare the one that is on your server right now with one from the zen cart download file you are presently using..


    1. This show any differences between the two files...

  7. #7
    Join Date
    Apr 2006
    Location
    Dark Side of the Moon
    Posts
    987
    Plugin Contributions
    1

    Default Re: Headers Already Sent

    hi haredo,

    yes, I've done this (but on the Mac I use Kdiff3 and DiffMerge).

    I have in fact carefully check over all the files under /includes/modules/pages/*** pick a page ****/header_php.php

    all to no affect.

  8. #8
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    6,196
    Plugin Contributions
    0

    Default Re: Headers Already Sent

    May you can resolve the issue by thumbing through this thread..

  9. #9
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Headers Already Sent

    Okay, so maybe your problem isn't with header_php.php files nor html_header.php.

    It's possible that you've customized something that's attempting to do a zen_redirect or is making a header() call from within a main_template_vars file or a template file, which will cause this sort of problem because you can't do a redirect like that once output has been sent to the page, and since html_header.php is where the output first starts (just as the error message says), it's just showing you a symptom, not a root cause.

    So, since the header_php file load first, then html_header, and then the main_template_var files and then all the templating system, you need to focus in the latter sections.
    Ref: http://www.zen-cart.com/index.php?ma...roducts_id=378
    .

    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.

 

 

Similar Threads

  1. Headers already sent
    By TelTel in forum Installing on a Linux/Unix Server
    Replies: 6
    Last Post: 4 May 2011, 05:39 PM
  2. headers already sent ...
    By pursuitbaits in forum General Questions
    Replies: 7
    Last Post: 8 Nov 2009, 08:00 AM
  3. headers already sent
    By Zaphan58 in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 19 Mar 2009, 12:15 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