We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37912
    • 12 Posts
    Hmmm...

    I set MySQL back to default, and I even unset the date_timezone setting in MODx, and everything seems to be fine now. Not sure what my issue was before.

    I must have changed two things at once while troubleshooting.

    Thanks!

    Tony
      • 15734
      • 70 Posts
      This install is on a shared server. I don't have the ability to change the time zone settings for either PHP or MySQL. The main issue that confuses me is that this worked fine until I made a change in Modx system settings. Now I've put them back to no value for both timezone and offset in Modx but I still have the problem, I can change the default template in system settings and create a new document then set it back to what I want the default to be. That's awkward and I can't change an existing page.

      The other odd thing is that everything else works just fine in Modx. It's only the template changing bit that's a problem. And no errors are thrown.

      Sorry for being so thick here but if everything else is working why is changing the template so tied into the timezone settings?
      • Because changing the template temporarily stores you data in MySQL with a timestamp which expires the validity of the temporary data. If your MySQL and PHP timezones do not match, the data will not be found or if it is, it may already be expired (or not yet valid) in the other timezone.
          • 15734
          • 70 Posts
          Again sorry for being so dense and I do really appreciate your help but I'm desperate to get this fixed. I can't make any changes to the server, it's a shared host. The timezone setting in the system has is now blank as it was before. The offset is also blank as it was before. I've cleared the cache, purged all sessions, deleted everything in core/cache. Still can't make any changes to the template. Any other suggestions? Maybe I'm missing something but this seems like it could be a problem for a few people.
          • Tell your server admin the PHP date.timezone needs to be set appropriately to match MySQL's time zone, or set your date_timezone setting in MODX System Settings to the appropriate time zone.
              • 15734
              • 70 Posts
              Okay. I'll make the request. Thanks for the help.
                • 9241
                • 42 Posts
                I know this is an old topic, but I'm experiencing the same problem, both my php config and mysql setup has the same timezone and still no luck as I cannot change the template.

                I really think this is an issue/bug.
                • Quote from: EvoBunny at Jan 13, 2012, 01:43 PM
                  I know this is an old topic, but I'm experiencing the same problem, both my php config and mysql setup has the same timezone and still no luck as I cannot change the template.

                  I really think this is an issue/bug.
                  What specifically are your MySQL and PHP timezones set to?
                    • 9241
                    • 42 Posts
                    Both are Africa/Johannesburg
                    • MySQL requires an offset from UTC, not that string which is only valid for PHP time zones. So what specifically is it set to in MySQL?