Subscribe: RSS
  • Henrik Nielsen Reply #1, 5 years ago
    I’m not sure if this has been reported before: (If so, I apologize, but I can’t find it).

    I had just tried upgrading Evo from 1.00 to version 1.01 (REV 5622) without any problems in php version 5.2! But on PHP Version 5.3 I got the following error in the welcome screen:

    Warning: strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting 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 'Europe/Berlin' for 'CEST/2.0/DST' instead in /home/www/domain.tld/manager/includes/rss.inc.php on line 50


    - and the error are repeated in several different files in the list.

    For me it’s not a problem - at the time being - I’ve just downgraded the PHP version at my host.

    But are there anybody who have suggestions for a solution?

    On PHP Version: 5.2.9-0.dotdeb.1:
    - Mysql version: 5.0.32-Debian_7etch8-log
    - PDO Driver for MySQL, client library version: 5.0.84
    - Memory size: 128 mb.
    - Apache: 2.2.3 (Server API: CGI/FastCGI )
    - Suhosin Patch 0.9.7 and Zend Scripting Language Engine installed.

    On PHP Version: 5.3.0
    - Mysql version: mysqlnd 5.0.5-dev - 081106 - $Revision: 1.3.2.27 $
    - PDO Driver for MySQL, client library version: mysqlnd 5.0.5-dev - 081106 - $Revision: 1.3.2.27 $
    - Memory size: 128 mb.
    - Apache: 2.2.3 (Server API: CGI/FastCGI )
    - Zend Scripting Language Engine installed.
      - A small step for mankind, so why not take two...

      Working with web production, graphic design/workflow, photo and education - but are trying to get a life in between!
    • I have a feeling it is related to this:

      http://modxcms.com/forums/index.php/topic,37756.msg228980.html#msg228980

      cheers/k
      • splittingred Reply #3, 5 years ago
        Yep, kongondo is right; PHP 5.3.0 has an issue where you’ll need to explicitly set the Timezone in the php.ini, otherwise that will always output an error. Garry provided a good solution:

        Quote from: garryn

        The date timezone error is also something I had when I upgraded to PHP 5.3, it seems the stock PHP 5.3 doesn’t set a value for this - to correct the problem, edit your php.ini file and add in a recognized timezone value for the ’date.timezone’ setting. There’s a whole list of accepted timezones at: http://us.php.net/manual/en/timezones.php
          shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • Henrik Nielsen Reply #4, 5 years ago
          Hello kongondo and splittingred,

          Thank you for your help!

          I could not fix this in my php.ini file, (I don’t have permissions to edit the full content of the file).
          But I added this in my .htaccess file:

          SetEnv TZ Europe/Copenhagen


          - Maybe it should be included in the distribution file, that this are a possibly solution?

          Greetings!
            - A small step for mankind, so why not take two...

            Working with web production, graphic design/workflow, photo and education - but are trying to get a life in between!
          • Ryan Thrash Reply #5, 5 years ago
            Would it help to have the timezone set during installation/upgrade? This would be if it didn’t detect a proper setting in php.ini. Perhaps a version compare if it doesn’t detect a proper setting in the PHP config ... or?
              Ryan Thrash, MODX Co-Founder & Leader of Awesomeness
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • Henrik Nielsen Reply #6, 5 years ago
              Quote from: rthrash at Aug 11, 2009, 06:56 AM

              Would it help to have the timezone set during installation/upgrade? This would be if it didn’t detect a proper setting in php.ini. Perhaps a version compare if it doesn’t detect a proper setting in the PHP config ... or?

              For me it is not a problem to edit the htaccess file myself, what - I think - the most of us do. But if it should be set during installation, then should the other settings in the htaccess file also be set, which will result in a more complicated installation process.

              My suggestion are that something like this:

              #Timezone Settings 
              #(Required in PHP 5.3+ if your don't have the permissions to edit the php.ini file: 
              #Replace Location with your own location - See: a link to some documentation )
              #SetEnv TZ Location 

              - are placed in the htaccess file - just to showing people the right direction, and furthermore it’s also a easy solution wink

              But what are the other users thinking about this?

              Greetings!
                - A small step for mankind, so why not take two...

                Working with web production, graphic design/workflow, photo and education - but are trying to get a life in between!
              • Ryan Thrash Reply #7, 5 years ago
                I was thinking it could be automated and included in the config.inc.php file. Not sure if that would work though, but hoping it might.
                  Ryan Thrash, MODX Co-Founder & Leader of Awesomeness
                  Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • Henrik Nielsen Reply #8, 5 years ago
                  Quote from: rthrash at Aug 11, 2009, 08:39 AM

                  I was thinking it could be automated and included in the config.inc.php file. Not sure if that would work though, but hoping it might.

                  I’m not sure if I remember it correctly, but setting it in php with for example "php_value date.timezone" could give some trouble for those who are on a shared server running suPHP? - And I’m not a programmer (by nature or in reality), so there is probably some others who know more...
                    - A small step for mankind, so why not take two...

                    Working with web production, graphic design/workflow, photo and education - but are trying to get a life in between!
                  • What difference between
                    SetEnv TZ Europe/Copenhagen

                    and
                    php_value date.timezone Europe/Copenhagen

                    ?
                    • Henrik Nielsen Reply #10, 5 years ago
                      Quote from: Paprikas at Aug 11, 2009, 09:36 AM

                      What difference between
                      SetEnv TZ Europe/Copenhagen

                      and
                      php_value date.timezone Europe/Copenhagen

                      ?

                      @Paprikas: I’m sorry - I mixed two things together:

                      suPHP does not support the php_value/php_admin_value directive known by mod_php to parse configuration options to scripts for certain virtual hosts or directories.

                      - from suPHP’s FAQ on http://www.suphp.org/FAQ.html - but - if I understand it correctly this time - that is when placed directly in the htaccess file and therefore not in a php file.
                        - A small step for mankind, so why not take two...

                        Working with web production, graphic design/workflow, photo and education - but are trying to get a life in between!