Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2016
    Location
    UK
    Posts
    3
    Plugin Contributions
    0

    Default Warning: Headers already sent

    My website is creating a lot of debug files which all consist of the following error:
    PHP Warning: Cannot modify header information - headers already sent by (output started at /home/sites/xxxxxx/public_html/xxxxxx/includes/templates/template_default/common/tpl_box_default_left.php:20) in /home/sites/xxxxxx/public_html/owa/owa_coreAPI.php on line 1079

    I have read the article which everyone gets referred to at https://www.zen-cart.com/content.php...s-already-sent.

    I have checked the file generating the error and can't find any extra spaces, so I guess it must be the code that is wrong?

    I have absolutely no idea when it comes to php code and so would appreciate it if someone could tell me what is wrong with the code below (line 20 is the line beginning with the <h3 class):

    <!--// bof: <?php echo $box_id; ?> //-->
    <div class="leftBoxContainer" id="<?php echo str_replace('_', '-', $box_id ); ?>" style="width: <?php echo $column_width; ?>">
    <h3 class="leftBoxHeading" id="<?php echo str_replace('_', '-', $box_id) . 'Heading'; ?>"><?php echo $title; ?></h3>
    <?php echo $content; ?>
    </div>
    <!--// eof: <?php echo $box_id; ?> //-->

  2. #2
    Join Date
    Jun 2010
    Location
    Austria
    Posts
    115
    Plugin Contributions
    0

    Default Re: Warning: Headers already sent

    how does the beginning of your file look like?

    The very first characters should be:
    <?php

    If you don't have any PHP code to follow you can use:
    <?php ?>

    Nothing should come before this.

  3. #3
    Join Date
    Apr 2014
    Location
    Polska
    Posts
    20
    Plugin Contributions
    0

    Default Re: Warning: Headers already sent

    Hi
    If this is not some stupid typo then it will be hard to help You without digging into code.
    As checked this owa is some web analytics code, it may be passing some garbage via left column variables. Im[' assuming you have some sidebox for this analytics?
    If so then try to disable this one siebox and check if errors still appears (then you will know what causes it)

  4. #4
    Join Date
    Feb 2016
    Location
    UK
    Posts
    3
    Plugin Contributions
    0

    Default Re: Warning: Headers already sent

    Thanks for the reply.

    The file in full is:

    <?php
    /**
    * Common Template - tpl_box_default_left.php
    *
    * @package templateSystem
    * @copyright Copyright 2003-2005 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: tpl_box_default_left.php 2975 2006-02-05 19:33:51Z birdbrain $
    */

    // choose box images based on box position
    if ($title_link) {
    $title = '<a href="' . zen_href_link($title_link) . '">' . $title . BOX_HEADING_LINKS . '</a>';
    }
    //
    ?>
    <!--// bof: <?php echo $box_id; ?> //-->
    <div class="leftBoxContainer" id="<?php echo str_replace('_', '-', $box_id ); ?>" style="width: <?php echo $column_width; ?>">
    <h3 class="leftBoxHeading" id="<?php echo str_replace('_', '-', $box_id) . 'Heading'; ?>"><?php echo $title; ?></h3>
    <?php echo $content; ?>
    </div>
    <!--// eof: <?php echo $box_id; ?> //-->

  5. #5
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Warning: Headers already sent

    I would also take a look at this extra file: public_html/owa/owa_coreAPI.php on line 1079

    To see it is/was doing because it appears that the above template file is fine, but it is outputting code (echo this or that and providing html as well) to the browser, and it may be that the above api is expecting to not have done that yet or to try to apply something that is no longer "permitted" at that point...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #6
    Join Date
    Feb 2016
    Location
    UK
    Posts
    3
    Plugin Contributions
    0

    Default Re: Warning: Headers already sent

    Thanks everyone for the replies. I have disabled owa and now no debug reports are being generated.

  7. #7
    Join Date
    Apr 2014
    Location
    Polska
    Posts
    20
    Plugin Contributions
    0

    Default Re: Warning: Headers already sent

    but still its partially solved

 

 

Similar Threads

  1. Warning: Cannot modify header information - headers already sent by
    By Jacket in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 12 Oct 2010, 08:15 AM
  2. Replies: 19
    Last Post: 28 Jan 2010, 05:48 AM
  3. Warning: Headers already sent (help needed)
    By mookmik in forum Basic Configuration
    Replies: 9
    Last Post: 25 May 2008, 04:38 PM
  4. Replies: 7
    Last Post: 31 Jul 2006, 06:36 PM

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