Page 1 of 5 123 ... LastLast
Results 1 to 10 of 45
  1. #1
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    8,389
    Plugin Contributions
    67

    Default myDEBUG Backtrace [Support Thread]

    This plugin builds on the suggestion I made to have the database's query_factory class include a debug_backtrace when a database interface error is detected, to aid in problem determination. There are other cases when a Zen Cart myDEBUG*.log file is created in which a "victim" (usually one of the Zen Cart built-in functions) is identified, but the "culprit" is actually the function's caller. This plugin updates the Zen Cart's built-in error handling (both admin- and store-side) to include a PHP debug_backtrace as part of the debug-log. That is, instead of receiving:
    Code:
    [19-Jun-2014 20:19:22] PHP Warning:  strtr() [function.strtr]: The second argument is not an array in C:\xampp\htdocs\testing\includes\functions\functions_general.php on line 64
    you'll receive the following log from which you can easily determine the "culprit" (/includes/init_includes/init_item.php):
    Code:
    [19-Jun-2014 20:19:22] #1  strtr() called at [C:\xampp\htdocs\testing\includes\functions\functions_general.php:64]
    #2  zen_parse_input_field_data() called at [C:\xampp\htdocs\testing\includes\init_includes\init_item.php:8]
    #3  require(C:\xampp\htdocs\testing\includes\init_includes\init_item.php) called at [C:\xampp\htdocs\testing\includes\autoload_func.php:48]
    #4  require(C:\xampp\htdocs\testing\includes\autoload_func.php) called at [C:\xampp\htdocs\testing\includes\application_top.php:150]
    #5  require(C:\xampp\htdocs\testing\includes\application_top.php) called at [C:\xampp\htdocs\testing\index.php:26]
    
    
    [19-Jun-2014 20:19:22] PHP Warning:  strtr() [function.strtr]: The second argument is not an array in C:\xampp\htdocs\testing\includes\functions\functions_general.php on line 64
    I'll be submitting this to the Plugins area shortly and will post back the download link once I've received it!

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    8,389
    Plugin Contributions
    67

    Default Re: myDEBUG Backtrace [Support Thread]

    The plugin will be available here, once approved: http://www.zen-cart.com/downloads.php?do=file&id=1879

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    8,389
    Plugin Contributions
    67

    Default Re: myDEBUG Backtrace [Support Thread]

    Now available for download ...

  4. #4
    Join Date
    Jul 2012
    Posts
    13,750
    Plugin Contributions
    16

    Default Re: myDEBUG Backtrace [Support Thread]

    Quick question to help identify how soon I should consider installing this (because I will regardless), I have been getting debug logs regarding duplicate cache entries for some time now, it started in 1.5.0 and while less frequent continues to appear in ZC 1.5.1. Is it likely that this additional debugging code would help identify where/why that is happening? I don't need to discuss the issue her that's for another threade, I'm just wondering about this plugin and if I should install it now to try to pinpoint the issue better by beginning some more history collection or if it is not likely to help for this one particular issue.
    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

  5. #5
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    8,389
    Plugin Contributions
    67

    Default Re: myDEBUG Backtrace [Support Thread]

    This plugin with help identify the cause of what I've termed "victim reports" in the debug log files, i.e. a debug-log file that reports an error in a class or function when the issue actually lies in the parameters supplied by the caller of the function.

  6. #6
    Join Date
    Aug 2011
    Posts
    199
    Plugin Contributions
    0

    Default Re: myDEBUG Backtrace [Support Thread]

    I have installed this. Where can I see the logs ?

  7. #7
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    8,389
    Plugin Contributions
    67

    Default Re: myDEBUG Backtrace [Support Thread]

    You'll only see the log-files (either in your /cache folder if you're running v1.5.0 or the /logs folder for v1.5.1+) if there's a PHP-related issue.

  8. #8
    Join Date
    Aug 2011
    Posts
    199
    Plugin Contributions
    0

    Default Re: myDEBUG Backtrace [Support Thread]

    I am running 1.5.1.
    I checked both the logs and cache folder. I do not see any entry there. I mean there are logs in logs folder, but not for today's or last week's date.
    Am I doing the right thing? I have just taken backup and copied the files. And to reproduce the error, I clicked on the link which was giving error:

    http://bambino.co.in/index.php?main_page=products_new
    http://bambino.co.in/index.php?main_page=products_all
    http://bambino.co.in/index.php?main_page=specials
    ... and so on

    and then looked in the logs folder.
    What should I do to solve this ?
    Last edited by devyani; 11 Aug 2014 at 02:53 PM. Reason: update

  9. #9
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    8,389
    Plugin Contributions
    67

    Default Re: myDEBUG Backtrace [Support Thread]

    Use your admin's Tools->Developers Tool Kit to search for select count(distinct *) as total in all Admin/Catalog files. What file(s) show as containing that code fragment?

  10. #10
    Join Date
    Aug 2011
    Posts
    199
    Plugin Contributions
    0

    Default Re: myDEBUG Backtrace [Support Thread]

    I checked, there is no result for this match. I am searching in the last option (Look-up in all files) of the developer's tool kit & as advised by you, I am selecting both catalogue and admin files . Also I have selected both php and css.

 

 
Page 1 of 5 123 ... LastLast

Similar Threads

  1. Hebrew Support - new release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 9
    Last Post: 28 Feb 2016, 02:21 AM
  2. Wordpress On ZC [Support Thread]
    By hira in forum All Other Contributions/Addons
    Replies: 1858
    Last Post: 17 Jan 2014, 01:24 AM
  3. Replies: 4
    Last Post: 19 Jan 2013, 05:47 AM
  4. SnapShot [support thread]
    By skipwater in forum All Other Contributions/Addons
    Replies: 32
    Last Post: 26 Oct 2012, 08:38 PM
  5. PurpleShades Support Thread
    By kobra in forum Addon Templates
    Replies: 122
    Last Post: 18 May 2011, 07:18 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