Thread: Unwanted logs

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Oct 2019
    Location
    UK
    Posts
    70
    Plugin Contributions
    0

    Default Unwanted logs

    Hi

    There are two logs which keep filling up my servers unnecessarily: Admin Activity and the MyDebug logs.

    Is there any way that I can deactivate these please?

    Thanks

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

    Default Re: Unwanted logs

    That is something you don't truly want to do. The logs are generated because something is not right. While the filename looks mostly the same each time, the content of each file (just start with the most recent) will identify what problem is occurring which can lead to a solution. The solution will prevent the need for the log to be generated which is much different than just not generating logs any more...

    Note, the content of a myDEBUG-adm file will include a path to your store's admin, please replace the foldername with "admin" when posting here. Also, just before pasting the content, press the hashtag button (#) in the messagebox toolbar.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,672
    Plugin Contributions
    123

    Default Re: Unwanted logs

    @mc covered the case of debug logs above. For admin activity logs, these can be archived off and then cleared:

    https://docs.zen-cart.com/user/admin.../#purging-logs
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  4. #4
    Join Date
    Oct 2019
    Location
    UK
    Posts
    70
    Plugin Contributions
    0

    Default Re: Unwanted logs

    Quote Originally Posted by mc12345678 View Post
    That is something you don't truly want to do. The logs are generated because something is not right. While the filename looks mostly the same each time, the content of each file (just start with the most recent) will identify what problem is occurring which can lead to a solution. The solution will prevent the need for the log to be generated which is much different than just not generating logs any more...

    Note, the content of a myDEBUG-adm file will include a path to your store's admin, please replace the foldername with "admin" when posting here. Also, just before pasting the content, press the hashtag button (#) in the messagebox toolbar.
    OK but it seems that every action creates a MyDebug log. The software has been installed according to the instructions so not sure why these keep getting generated. After a fresh install the error start immediately.

  5. #5
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,672
    Plugin Contributions
    123

    Default Re: Unwanted logs

    How about showing us one like @mc suggested?
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  6. #6
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,585
    Plugin Contributions
    30

    Default Re: Unwanted logs

    not sure why these keep getting generated
    The text of the log describes the exact reason. Read it. Google it.
    The people here don't do anything different.
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

  7. #7
    Join Date
    Aug 2020
    Location
    Richarson
    Posts
    94
    Plugin Contributions
    0

    Default Re: Unwanted logs

    Quote Originally Posted by torvista View Post
    The text of the log describes the exact reason. Read it. Google it.
    The people here don't do anything different.
    I hope you don't mind me inserting myself into this thread, but I am also have an issue with logs and I have searched online with no luck. If I am out of line, my apologies. I am not well versed in coding so any help would be greatly appreciated.

    First off, I am using 1.5.7c
    Template: Yourstore

    I keep getting the same error log and have tried referring to other files from other templates, but no luck.

    The error I am receiving is:

    [17-Aug-2021 10:54:40 America/Chicago] Request URI: /index.php?main_page=advanced_search_result&keyword=white&search_in_description=1 &categories_id=&manufacturers_id=&pfrom=&pto=&dfrom=&dto=, IP address: 99.57.241.122
    #1 each() called at [/home/xxxxxx/public_html/includes/templates/yourstore/templates/tpl_advanced_search_result_default.php:33]
    #2 require(/home/xxxxxx/public_html/includes/templates/yourstore/templates/tpl_advanced_search_result_default.php) called at [/home/xxxxxx/public_html/includes/templates/yourstore/common/tpl_main_page.php:293]
    #3 require(/home/xxxxxx/public_html/includes/templates/yourstore/common/tpl_main_page.php) called at [/home/xxxxxx/public_html/index.php:94]
    --> PHP Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/xxxxxx/public_html/includes/templates/yourstore/templates/tpl_advanced_search_result_default.php on line 33.

    Line #33 reads as:
    while (list($key, $value) = each($_GET)) {

    the line immediately after:
    if ( ($key != 'currency') && ($key != zen_session_name()) && ($key != 'x') && ($key != 'y') ) {

    Any input from coders would be greatly appreciated.

    Thank you.

  8. #8
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,585
    Plugin Contributions
    30

    Default Re: Unwanted logs

    Seems pretty clear what the error is: "The each() function is deprecated" in the file /tpl_advanced_search_result_default
    Not an error as such but just php complaining...which it will do more of, every time your host upgrades.
    It needs to be fixed as what is just a complaint now, will become a shop-stopper in a future php when it no longer allows this function at all. This is a heads-up and you need to deal with it.

    So search for that and the first result is (as is often the case) in stack overflow with several examples of code snippets that may trigger this error, with corresponding equivalents that do NOT use each().

    However, what I would do after reading that and learning something, is
    1) First check your file against the latest version/default files....and I see that "each" is not used in the referenced file....meaning that your override version is not updated to 157c at all.
    2) Compare that file with the development version on GitHub....chances are someone has already fixed it and you'll find a snippet there to copy.

    So between those and stack overflow...a fix can be attempted.

    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

  9. #9
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Unwanted logs

    To go that even extra step forward from what torvista said recently: So the searching about which torvista described would be something like: 'the each function is depricated php'.

    Such should lead to many sites where something like: list() = each is no longer supported. Now, unfortunately I don't have the associated docs entry bookmarked, but that specific issue is captured in the docs for Zen Cart. I believe it is in the developer side of the information and associated with updating plugins.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #10
    Join Date
    Aug 2020
    Location
    Richarson
    Posts
    94
    Plugin Contributions
    0

    Default Re: Unwanted logs

    Quote Originally Posted by torvista View Post
    Seems pretty clear what the error is: "The each() function is deprecated" in the file /tpl_advanced_search_result_default
    Not an error as such but just php complaining...which it will do more of, every time your host upgrades.
    It needs to be fixed as what is just a complaint now, will become a shop-stopper in a future php when it no longer allows this function at all. This is a heads-up and you need to deal with it.

    So search for that and the first result is (as is often the case) in stack overflow with several examples of code snippets that may trigger this error, with corresponding equivalents that do NOT use each().

    However, what I would do after reading that and learning something, is
    1) First check your file against the latest version/default files....and I see that "each" is not used in the referenced file....meaning that your override version is not updated to 157c at all.
    2) Compare that file with the development version on GitHub....chances are someone has already fixed it and you'll find a snippet there to copy.

    So between those and stack overflow...a fix can be attempted.

    Thanks for the feedback. I have found other errors and was able to resolve with replacing newer files. I have checked other files and made changes, but it didn't resolve. I will certainly take your advice though and do a more thorough search. Thank you very much!!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Unwanted Spacing!
    By jesi in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 6 Feb 2012, 07:51 PM
  2. Unwanted images
    By txscubarat in forum General Questions
    Replies: 2
    Last Post: 29 Jul 2009, 04:13 PM
  3. Unwanted Heading!
    By lizgjones in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 12 Mar 2008, 10:59 PM
  4. Unwanted space
    By Boghead in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 10 Nov 2007, 06:13 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