We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22640
    • 44 Posts
    Hi everyone,

    This may be a silly question, but since I can’t find anyting on it, I’ll ask it smiley

    How do you turn off event logging? The database table has been filling up with Warning messages and reaching 2 Gigs of space. The warning messages aren’t really valid for the coding so I’m hoping to turn off the event logging, at least temporarily.

    I see at http://wiki.modxcms.com/index.php/API:logEvent that the coding for inserting it into the DB is on line 1285 of that file, but I can’t comment out those lines without commenting out the call to it - and I don’t know where that is. Is there something in the Config I’m totally missing??

    Does anyone have any suggestions?

    Thanks
    Glenn
      • 5274
      • 177 Posts
      So what are the messages that are filling up the event log? I’ve found that they usually helpful to identify an error condition.
        • 22640
        • 44 Posts
        Quote from: Chuck at Apr 17, 2008, 09:30 PM

        So what are the messages that are filling up the event log? I’ve found that they usually helpful to identify an error condition.


        It has to do with a date() function I used. But my limited PHP knowledge, I don’t quite understand what it means.

        [tt]date() [function.date]: It is not safe to rely on the system’s timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ’America/Chicago’ for ’CDT/-5.0/DST’ instead[/tt]
          • 5274
          • 177 Posts
          I used to get those too. Try adding the following command to your PHP file or snippet:

          date_default_timezone_set(’America/Denver’);

          Google for the right time zone label but this is the one I use in my area.
            • 22640
            • 44 Posts
            Quote from: Chuck at Apr 17, 2008, 10:29 PM

            date_default_timezone_set(’America/Denver’);
            Google for the right time zone label but this is the one I use in my area.

            Thanks. I tried it and it worked great!

            Glenn