Results 1 to 5 of 5
  1. #1
    Join Date
    May 2020
    Location
    Embrun Ontario Canada
    Posts
    5
    Plugin Contributions
    0

    Default Log files keeps being created and filling up

    When investigating an issue with our online store, I tried to view logs files. I noticed that there was over 9,000 log files present, all dated last November. Nothing had the current date. I purged the log files using the Admin user, and they started filling up again with the current date.

    The following messages keep being added in the files, while I was on our website. We have not made any changes to the code, except adding a function to display a rolling logo at the top of our store. Our website is done using WordPress, but it uses Zencart when choosing the Online Store tap. Our URL is mrbss.ca.

    I am not familiar enough to be able to determine what is wrong and looking for help please.

    The messages in the logs are:

    [23-May-2020 12:16:35 UTC] Request URI: /index.php?main_page=index&cPath=173_369&page=1&sort=2a, IP address: 114.119.161.191
    #1 sizeof() called at [/home/michelblaissales/online/includes/templates/template_default/templates/tpl_ezpages_bar_header.php:19]
    #2 require(/home/michelblaissales/online/includes/templates/template_default/templates/tpl_ezpages_bar_header.php) called at [/home/michelblaissales/online/includes/templates/template_default/common/tpl_header.php:344]
    #3 require(/home/michelblaissales/online/includes/templates/template_default/common/tpl_header.php) called at [/home/michelblaissales/online/includes/templates/template_default/common/tpl_main_page.php:73]
    #4 require(/home/michelblaissales/online/includes/templates/template_default/common/tpl_main_page.php) called at [/home/michelblaissales/online/index.php:97]
    --> PHP Warning: sizeof(): Parameter must be an array or an object that implements Countable in /home/michelblaissales/online/includes/templates/template_default/templates/tpl_ezpages_bar_header.php on line 19.

    [23-May-2020 12:16:35 UTC] Request URI: /index.php?main_page=index&cPath=173_369&page=1&sort=2a, IP address: 114.119.161.191
    #1 array_key_exists() called at [/home/michelblaissales/online/includes/templates/template_default/sideboxes/tpl_categories.php:77]
    #2 require(/home/michelblaissales/online/includes/templates/template_default/sideboxes/tpl_categories.php) called at [/home/michelblaissales/online/includes/modules/sideboxes/categories.php:22]
    #3 require(/home/michelblaissales/online/includes/modules/sideboxes/categories.php) called at [/home/michelblaissales/online/includes/modules/column_left.php:31]
    #4 require(/home/michelblaissales/online/includes/modules/column_left.php) called at [/home/michelblaissales/online/includes/templates/template_default/common/tpl_main_page.php:92]
    #5 require(/home/michelblaissales/online/includes/templates/template_default/common/tpl_main_page.php) called at [/home/michelblaissales/online/index.php:97]
    --> PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /home/michelblaissales/online/includes/templates/template_default/sideboxes/tpl_categories.php on line 77.

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    9,652
    Plugin Contributions
    73

    Default Re: Log files keeps being created and filling up

    You don't indicate which zc156 sub-version you're using, but here are the zc156c versions of the two scripts that are causing you issues:

    /includes/templates/template_default/templates/tpl_ezpages_bar_header.php (line 19 highlighted):
    Code:
    <?php
    /**
     * Page Template
     *
     * Displays EZ-Pages Header-Bar content.<br />
     *
     * @package templateSystem
     * @copyright Copyright 2003-2019 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: DrByte 2019 Jan 04 Modified in v1.5.6a $
     */
    
      /**
       * require code to show EZ-Pages list
       */
      include(DIR_WS_MODULES . zen_get_module_directory('ezpages_bar_header.php'));
    ?>
    <?php if (!empty($var_linksList)) { ?>
    <div id="navEZPagesTop">
    <?php for ($i=1, $n=sizeof($var_linksList); $i<=$n; $i++) {  ?>
      <a href="<?php echo $var_linksList[$i]['link']; ?>"><?php echo $var_linksList[$i]['name']; ?></a><?php echo ($i < $n ? EZPAGES_SEPARATOR_HEADER : '') . "\n"; ?>
    <?php } // end FOR loop ?>
    </div>
    <?php } ?>
    /includes/templates/template_default/sideboxes/tpl_categories.php (note that there's no use of array_key_exists in this version of the script):
    Code:
    <?php
    /**
     * Side Box Template
     *
     * @package templateSystem
     * @copyright Copyright 2003-2018 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: Drbyte Sun Jan 7 21:28:50 2018 -0500 Modified in v1.5.6 $
     */
      $content = "";
    
      $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";
      for ($i=0, $j=sizeof($box_categories_array);$i<$j;$i++) {
        switch(true) {
    // to make a specific category stand out define a new class in the stylesheet example: A.category-holiday
    // uncomment the select below and set the cPath=3 to the cPath= your_categories_id
    // many variations of this can be done
    //      case ($box_categories_array[$i]['path'] == 'cPath=3'):
    //        $new_style = 'category-holiday';
    //        break;
          case ($box_categories_array[$i]['top'] == 'true'):
            $new_style = 'category-top';
            break;
          case ($box_categories_array[$i]['has_sub_cat']):
            $new_style = 'category-subs';
            break;
          default:
            $new_style = 'category-products';
          }
         if (zen_get_product_types_to_category($box_categories_array[$i]['path']) == 3 or ($box_categories_array[$i]['top'] != 'true' and SHOW_CATEGORIES_SUBCATEGORIES_ALWAYS != 1)) {
            // skip if this is for the document box (==3)
          } else {
          $content .= '<a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, $box_categories_array[$i]['path']) . '">';
    
          if ($box_categories_array[$i]['current']) {
            if ($box_categories_array[$i]['has_sub_cat']) {
              $content .= '<span class="category-subs-parent">' . $box_categories_array[$i]['name'] . '</span>';
            } else {
              $content .= '<span class="category-subs-selected">' . $box_categories_array[$i]['name'] . '</span>';
            }
          } else {
            $content .= $box_categories_array[$i]['name'];
          }
    
          if ($box_categories_array[$i]['has_sub_cat']) {
            $content .= CATEGORIES_SEPARATOR;
          }
          $content .= '</a>';
    
          if (SHOW_COUNTS == 'true') {
            if ((CATEGORIES_COUNT_ZERO == '1' and $box_categories_array[$i]['count'] == 0) or $box_categories_array[$i]['count'] >= 1) {
              $content .= CATEGORIES_COUNT_PREFIX . $box_categories_array[$i]['count'] . CATEGORIES_COUNT_SUFFIX;
            }
          }
    
          $content .= '<br />' . "\n";
        }
      }
    
      if (SHOW_CATEGORIES_BOX_SPECIALS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true' or SHOW_CATEGORIES_BOX_FEATURED_PRODUCTS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
    // display a separator between categories and links
        if (SHOW_CATEGORIES_SEPARATOR_LINK == '1') {
          $content .= '<hr id="catBoxDivider" />' . "\n";
        }
        if (SHOW_CATEGORIES_BOX_SPECIALS == 'true') {
          $show_this = $db->Execute("select s.products_id from " . TABLE_SPECIALS . " s where s.status= 1 limit 1");
          if ($show_this->RecordCount() > 0) {
            $content .= '<a class="category-links" href="' . zen_href_link(FILENAME_SPECIALS) . '">' . CATEGORIES_BOX_HEADING_SPECIALS . '</a>' . '<br />' . "\n";
          }
        }
        if (SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true') {
          // display limits
    //      $display_limit = zen_get_products_new_timelimit();
          $display_limit = zen_get_new_date_range();
    
          $show_this = $db->Execute("select p.products_id
                                     from " . TABLE_PRODUCTS . " p
                                     where p.products_status = 1 " . $display_limit . " limit 1");
          if ($show_this->RecordCount() > 0) {
            $content .= '<a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_NEW) . '">' . CATEGORIES_BOX_HEADING_WHATS_NEW . '</a>' . '<br />' . "\n";
          }
        }
        if (SHOW_CATEGORIES_BOX_FEATURED_PRODUCTS == 'true') {
          $show_this = $db->Execute("select products_id from " . TABLE_FEATURED . " where status= 1 limit 1");
          if ($show_this->RecordCount() > 0) {
            $content .= '<a class="category-links" href="' . zen_href_link(FILENAME_FEATURED_PRODUCTS) . '">' . CATEGORIES_BOX_HEADING_FEATURED_PRODUCTS . '</a>' . '<br />' . "\n";
          }
        }
        if (SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
          $content .= '<a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_ALL) . '">' . CATEGORIES_BOX_HEADING_PRODUCTS_ALL . '</a>' . "\n";
        }
      }
      $content .= '</div>';

  3. #3
    Join Date
    Jul 2012
    Posts
    15,130
    Plugin Contributions
    17

    Default Re: Log files keeps being created and filling up

    Check for includes/modules/YOUR_TEMPLATE/ezpages_bar_header.php. If you have that file, then should update it to be similar to includes/modules/ezpages_bar_header.php. An important part of that is the added $var_linksList = array();
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  4. #4
    Join Date
    May 2020
    Location
    Embrun Ontario Canada
    Posts
    5
    Plugin Contributions
    0

    Default Re: Log files keeps being created and filling up

    We have version v1.5.6c.

    The content we have of /includes/templates/template_default/templates/tpl_ezpages_bar_header.php is the following and line 19 is different.

    * @copyright Copyright 2003-2006 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_ezpages_bar_header.php 3377 2006-04-05 04:43:11Z ajeh $

    */



    /**

    * require code to show EZ-Pages list

    */

    include(DIR_WS_MODULES . zen_get_module_directory('ezpages_bar_header.php'));

    ?>

    <?php if (sizeof($var_linksList) >= 1) { ?>

    <div id="navEZPagesTop">

    <?php for ($i=1, $n=sizeof($var_linksList); $i<=$n; $i++) { ?>

    <a href="<?php echo $var_linksList[$i]['link']; ?>"><?php echo $var_linksList[$i]['name']; ?></a><?php echo ($i < $n ? EZPAGES_SEPARATOR_HEADER : '') . "\n"; ?>

    <?php } // end FOR loop ?>

    </div>

    <?php } ?>


    Here is only the first few lines of /includes/templates/template_default/sideboxes/tpl_categories.php, where I can see the version is different:

    <?php

    /**

    * Side Box Template

    *

    * @package templateSystem

    * @copyright Copyright 2003-2006 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_categories.php 4162 2006-08-17 03:55:02Z ajeh $


    So, it looks like we have some mismatching files in our installation. Does that make sense?

  5. #5
    Join Date
    Jul 2012
    Posts
    15,130
    Plugin Contributions
    17

    Default Re: Log files keeps being created and filling up

    Version 1.5.6c came with its own set of includes/templates/template_default files... Those should have been merged/incorporated/updated as part of building/rebuilding this version of the site. Otherwise, as seen here, not benefitting from the improvements and corrections that have been made to the software to support the new operating environment...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

 

 

Similar Threads

  1. My "Logs" folder keeps filling up with log files
    By Kjell Aa in forum General Questions
    Replies: 7
    Last Post: 3 Mar 2019, 05:45 PM
  2. v155 Log files being created every couple of minutes
    By Congerman in forum General Questions
    Replies: 12
    Last Post: 17 Feb 2019, 05:22 PM
  3. v154 Weird sql files being created in cache folder every second?
    By travbacon in forum General Questions
    Replies: 11
    Last Post: 7 Oct 2016, 08:21 PM
  4. v155 Medium and Large Images not being created
    By lidlchris in forum Setting Up Categories, Products, Attributes
    Replies: 8
    Last Post: 1 Sep 2016, 05:23 PM
  5. Pay Pal funds not appearing, orders ARE being created and logged...
    By two7s_clash in forum Addon Payment Modules
    Replies: 1
    Last Post: 20 Feb 2007, 08:50 AM

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