-->

DEVOPSZONES

  • Recent blogs

    PHP Warning: date(): It is not safe to rely on the system's timezone settings.

    Error:

    PHP Warning:  date(): 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /srv/www/htdocs/cacti/lib/functions.php on line 482



    Resolution:

    PHP Version: php-5.4.16-36.el7_1.x86_64
    Its a Problem with PHP version5.3 and above. We need to Define timezone in /etc/php.ini

    1. Edit /etc/php.ini
    vi /etc/php.ini

    2. Uncomment "date.timezone" line.

    [root@example log]# grep -i timezone /etc/php.ini
    ; Defines the default timezone used by the date functions
    ; http://php.net/date.timezone
    date.timezone = 'Europe/Prague'
    [root@example log]#

    3. Put your timezone Entry  ('Europe/Prague' in this case)and save it.
    4. Then restart Web server service.
    service httpd restart

    No comments