Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Join Date
    Jun 2006
    Location
    My family and I live in Brighton, England
    Posts
    982
    Plugin Contributions
    0

    Default strict_error_reporting.php - Where to access error messages?

    My site: tubularwiremeshribbon.com

    "New Products", "Featured Products", "Specials" and "All Products" are throwing the following error: WARNING: An Error occurred, please refresh the page and try again (as seen on this page).

    Following recommendations from this Zen post, I've created and enabled STRICT_ERROR_REPORTING by creating the file strict_error_reporting.php and placing it at /my-admin-folder-here/includes/extra_configures/strict_error_reporting.php.

    Where should the STRICT_ERROR_REPORTING error messages appear? If I visit the url it's ERROR 403 - FORBIDDEN and changing permissions did not seem to matter.

    There are no new error message in my logs and visiting the site with the new file in place does not display any error messages, as suggested here. And that page suggest adding the STRICT_ERROR_REPORTING code to /includes/local/configure.php, a file that does not exisit in my ZC 1.5.1.

    Any help would be very much appreciated. FYI: because of security concerns, the strict_error_reporting.php file is not in place at this moment.

  2. #2
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: strict_error_reporting.php - Where to access error messages?

    First off, and perhaps what I would say is most obvious is that your includes/configure.php file does not have a proper path for the logs directory. Please post your includes/configure.php (between CODE tags by clicking # in the messagebox toolbar) obscure your DB Password etc...

    That error should be generating a log file.

    After that can address the remaining strict_error_reporting issue...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: strict_error_reporting.php - Where to access error messages?

    To the local file, above attempted to be: admin/includes/local/configure.php as identified in the last thread reference, correct that file does not normally exist and must be created. To support the requested action, only the two lines provided are necessary as that file is loaded before the admin/includes/configure.php where anything that is in the local version will override the standard version when it comes to constant declaration/definintion.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,492
    Plugin Contributions
    88

    Default Re: strict_error_reporting.php - Where to access error messages?

    A couple of things:

    That FAQ article needs some major updating. The STRICT_ERROR_REPORTING setting only affects the error reporting in the early start-up of your Zen Cart (as set in /includes/application_top.php). Since that module uses the constant to set the start-up's error-reporting before the /extra_configure files are loaded, setting that constant in an /extra_configure file isn't going to do a thing.

    Since you're receiving the "Warning: An error ..." message, an error has been discovered and "should have" been logged into a myDEBUG*.log file. If you don't have any log files, the next issue to resolve is "How come?".

    As mc12345678 previously requested, it would help to see the contents of your /includes/configure.php file (with the database credentials xxxx'd out) to see if your logs' directory constant appears to be validly set. Note, too, that Zen Cart v1.5.1 and later will use the /cache folder to log those errors if the DIR_FS_LOGS definition is missing.

    The FAQ bit about setting /includes/local/configure.php to contain only the define statement setting the STRICT_ERROR_REPORTING value will provide an easy way to enable those initial start-up errors (which usually result in a white-screen, no on-screen message).

  5. #5
    Join Date
    Jun 2006
    Location
    My family and I live in Brighton, England
    Posts
    982
    Plugin Contributions
    0

    Default Re: strict_error_reporting.php - Where to access error messages?

    Thanks to you both for responding. I've included a copy of my /includes/configure.php below (Comments after):
    Code:
    <?php
    
    /**
    
     * @package Configuration Settings circa 1.5.1
    
     * @copyright Copyright 2003-2012 Zen Cart Development Team
    
     * @copyright Portions Copyright 2003 osCommerce
    
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    
     * File Built by zc_install on 2012-12-07 11:09:20
    
     */
    
    
    
    
    
    /*************** NOTE: This file is similar, but DIFFERENT from the "admin" version of configure.php. ***********/
    
    /***************       The 2 files should be kept separate and not used to overwrite each other.      ***********/
    
    
    
    // Define the webserver and path parameters
    
      // HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com
    
      // HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com
    
      define('HTTP_SERVER', 'http://tubularwiremeshribbon.com');
    
      define('HTTPS_SERVER', 'https://www.beadedlily.com/tubularwiremeshribbon.com');
    
    
    
      // Use secure webserver for checkout procedure?
    
      define('ENABLE_SSL', 'true');
    
    
    
    // NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
    
    // * DIR_WS_* = Webserver directories (virtual/URL)
    
      // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
    
      define('DIR_WS_CATALOG', '/');
    
      define('DIR_WS_HTTPS_CATALOG', '/');
    
    
    
      define('DIR_WS_IMAGES', 'images/');
    
      define('DIR_WS_INCLUDES', 'includes/');
    
      define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
    
      define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
    
      define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
    
      define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
    
      define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/');
    
      define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');
    
    
    
      define('DIR_WS_PHPBB', '/');
    
    
    
    // * DIR_FS_* = Filesystem directories (local/physical)
    
      //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
    
      define('DIR_FS_CATALOG', '/home/xxxx/public_html/tubularwiremeshribbon.com/');
    
    
    
      //the following path is a COMPLETE path to the /logs/ folder  eg: /var/www/vhost/accountname/public_html/store/logs ... and no trailing slash
    
      define('DIR_FS_LOGS', '/home/xxxx/public_html/logs');
    
    
    
      define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
    
      define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
    
      define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/');
    
      define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);
    
      define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
    
    
    
    // define our database connection
    
      define('DB_TYPE', 'mysql');
    
      define('DB_PREFIX', 'zen_');
    
      define('DB_CHARSET', 'utf8');
    
      define('DB_SERVER', 'localhost');
    
      define('DB_SERVER_USERNAME', 'xxxxxx');
    
      define('DB_SERVER_PASSWORD', 'xxxxx');
    
      define('DB_DATABASE', 'xxxxxx');
    
    
    
      // The next 2 "defines" are for SQL cache support.
    
      // For SQL_CACHE_METHOD, you can select from:  none, database, or file
    
      // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache 
    
      // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
    
      // ie: /path/to/your/webspace/public_html/zen/cache   -- leave no trailing slash  
    
      define('SQL_CACHE_METHOD', 'none'); 
    
      define('DIR_FS_SQL_CACHE', '/home/xxxx/public_html/tubularwiremeshribbon.com/cache');
    
    
    
    // EOF
    I noticed that the error log path seemed a bit off. HOWEVER, I have indeed been receiving error messages in my /logs folder nonetheless, but not related to this issue (I've resolved the issue it was referring to a couple of day ago). NO new error messages appear from this current crisis.

    Again, though, the log path did not seem correct. It seems to me that it should be some version of the following:
    Code:
    define('DIR_FS_LOGS', '/home/xxxx/public_html/tubularwiremeshribbon.com/logs');
    I therefore tried this but no new error messages were visible.

    Finally I installed the myDEBUG Backtrace in the hopes of generating an error message. Again, nothing. I then changed my config file back to its original settings of "/home/xxxx/public_html/logs" (as that was indeed generating errors) but still no error messages.

    Since that plugin would only generate php errors, could it be non-php? I'm at a loss.

    FYI: I've now uninstalled the myDEBUG Backtrace plugin.

    Any thoughts?

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,492
    Plugin Contributions
    88

    Default Re: strict_error_reporting.php - Where to access error messages?

    Your /logs folder definition, based on the DIR_FS_CATALOG setting, should be:
    Code:
    define('DIR_FS_LOGS', '/home/xxxx/public_html/tubularwiremeshribbon.com/logs');
    Now, is there actually such a folder in your store?

  7. #7
    Join Date
    Jun 2006
    Location
    My family and I live in Brighton, England
    Posts
    982
    Plugin Contributions
    0

    Default Re: strict_error_reporting.php - Where to access error messages?

    Quote Originally Posted by lat9 View Post
    Your /logs folder definition, based on the DIR_FS_CATALOG setting, should be:
    Code:
    define('DIR_FS_LOGS', '/home/xxxx/public_html/tubularwiremeshribbon.com/logs');
    Now, is there actually such a folder in your store?
    OK, I've been able to successfully access the myDEBUG Backtrace plugin error logs in my /logs file:
    Code:
    [04-Jul-2015 11:30:29] PHP Warning:  Wrong parameter count for debug_print_backtrace() in /home/xxxx/public_html/tubularwiremeshribbon.com/includes/extra_configures/enable_error_logging.php on line 20
    [04-Jul-2015 11:30:29] 
    [04-Jul-2015 11:30:29] PHP Fatal error:  1109:Unknown table 'p' in field list :: select count(p.products_id) as total  in /home/xxxx/public_html/tubularwiremeshribbon.com/includes/classes/db/mysql/query_factory.php on line 120
    Now to decode them. I'm not seeing Unknown table 'p' in field list in query_factory.php...

  8. #8
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,492
    Plugin Contributions
    88

    Default Re: strict_error_reporting.php - Where to access error messages?

    The first one is described here (a change I need to make to the myDEBUG Backtrace plugin: https://www.zen-cart.com/showthread....91#post1282991

    Once the issue with the debug_backtrace is corrected, the 2nd log will have additional details that trace the calls that wind up at the failing call to the $db function.

    What did you do to be able to view the log files?

  9. #9
    Join Date
    Jun 2006
    Location
    My family and I live in Brighton, England
    Posts
    982
    Plugin Contributions
    0

    Default Re: strict_error_reporting.php - Where to access error messages?

    Quote Originally Posted by lat9 View Post
    The first one is described here (a change I need to make to the myDEBUG Backtrace plugin: https://www.zen-cart.com/showthread....91#post1282991

    Once the issue with the debug_backtrace is corrected, the 2nd log will have additional details that trace the calls that wind up at the failing call to the $db function.

    What did you do to be able to view the log files?
    I must have had an error in the "define('DIR_FS_LOGS', '/home/xxxx/public_html/tubularwiremeshribbon.com/logs');" line, which I finally corrected :)

    OK, I've updated your plugin files and here is the error log:
    Code:
    [04-Jul-2015 12:21:33] #1  trigger_error(1109:Unknown table 'p' in field list :: select count(p.products_id) as total , 256) called at [/home/xxxx/public_html/tubularwiremeshribbon.com/includes/classes/db/mysql/query_factory.php:120]
    #2  queryFactory->show_error() called at [/home/ xxxx /public_html/tubularwiremeshribbon.com/includes/classes/db/mysql/query_factory.php:105]
    #3  queryFactory->set_error(1109, Unknown table 'p' in field list) called at [/home/ xxxx /public_html/tubularwiremeshribbon.com/includes/classes/db/mysql/query_factory.php:227]
    #4  queryFactory->Execute(select count(p.products_id) as total ) called at [/home/ xxxx /public_html/tubularwiremeshribbon.com/includes/classes/split_page_results.php:78]
    #5  splitPageResults->splitPageResults(, 30, p.products_id, page) called at [/home/ xxxx /public_html/tubularwiremeshribbon.com/includes/modules/responsive_sheffield_blue/product_listing.php:34]
    #6  include(/home/ xxxx 0/public_html/tubularwiremeshribbon.com/includes/modules/responsive_sheffield_blue/product_listing.php) called at [/home/ xxxx /public_html/tubularwiremeshribbon.com/includes/templates/responsive_sheffield_blue/templates/tpl_modules_product_listing.php:13]
    #7  require(/home/ xxxx /public_html/tubularwiremeshribbon.com/includes/templates/responsive_sheffield_blue/templates/tpl_modules_product_listing.php) called at [/home/ xxxx /public_html/tubularwiremeshribbon.com/includes/templates/responsive_sheffield_blue/templates/tpl_products_new_default.php:19]
    #8  require(/home/ xxxx /public_html/tubularwiremeshribbon.com/includes/templates/responsive_sheffield_blue/templates/tpl_products_new_default.php) called at [/home/ xxxx /public_html/tubularwiremeshribbon.com/includes/templates/responsive_sheffield_blue/common/tpl_main_page.php:229]
    #9  require(/home/ xxxx /public_html/tubularwiremeshribbon.com/includes/templates/responsive_sheffield_blue/common/tpl_main_page.php) called at [/home/ xxxx /public_html/tubularwiremeshribbon.com/index.php:97]
    
    [04-Jul-2015 12:21:33] PHP Fatal error:  1109:Unknown table 'p' in field list :: select count(p.products_id) as total  in /home/ xxxx /public_html/tubularwiremeshribbon.com/includes/classes/db/mysql/query_factory.php on line 120
    Still mysterious but I'm off to try and decipher it and appreciate and comments :)

  10. #10
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,492
    Plugin Contributions
    88

    Default Re: strict_error_reporting.php - Where to access error messages?

    To my eyes it looks like line #5 identifies the source of the error:
    Code:
    #5  splitPageResults->splitPageResults(, 30, p.products_id, page) called at [/home/ xxxx /public_html/tubularwiremeshribbon.com/includes/modules/responsive_sheffield_blue/product_listing.php:34]
    So, you need to look at line 34 in /includes/modules/responsive_sheffield_blue/product_listing.php to determine how it got there!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 2
    Last Post: 15 Mar 2014, 09:42 PM
  2. How and Where to display warning/error messages
    By jsmuck02 in forum General Questions
    Replies: 3
    Last Post: 23 Apr 2008, 08:01 PM
  3. PHP Error messages in my Zen-Cart 1.3.8 are missing
    By jaycode in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 13 Mar 2008, 06:22 AM
  4. help with php error messages/won't load product pages
    By pablosart in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 12 May 2007, 05:14 AM
  5. Replies: 2
    Last Post: 15 Dec 2006, 12:59 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