Ad Widget

Collapse

Invalid date.timezone value 'Europe/Switzerland/Zurich' after upgrading zabbix 2.4.6

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mbeck
    Junior Member
    • Sep 2015
    • 4

    #1

    Invalid date.timezone value 'Europe/Switzerland/Zurich' after upgrading zabbix 2.4.6

    Hi,

    I made a upgrade of zabbix from 2.0.2 to 2.4.6.
    My PHP is on version
    php -v
    PHP 5.5.9-1ubuntu4.11
    Apche is on Apache/2.4.7
    and my Ubuntu is on Ubuntu 14.04.3 LTS

    Everything went well like a charm without issues. The front end configuration/setup went without errors.

    I am able to login to the front end and see everything but every page is showing multiple times the same error

    like for ex


    Idate(): Invalid date.timezone value 'Europe/Switzerland/Zurich', we selected the timezone 'UTC' for now
    strtotime(): Invalid date.timezone value 'Europe/Switzerland/Zurich', we selected the timezone 'UTC' for now.
    date(): Invalid date.timezone value 'Europe/Switzerland/Zurich', we selected the timezone 'UTC' for now

    I have attached the dashboard page for ex. But the monitoring is going on well and no issues with that.
    My /etc/php5/apache2/php.ini also looks good as below
    [Date]
    date.timezone = Europe/Switzerland/Zurich

    does anyone has some ideas to correct there.? May be this is a bug. but i am not sure.

    thankx for your info.
    Beck
    Attached Files
  • mbeck
    Junior Member
    • Sep 2015
    • 4

    #2
    Hi,
    I found the solution also after digging a few forums. well i changed the following in php.ini (/etc/php5/apache2/php.ini and in /etc/php5/cli/php.ini)

    from date.timezone = Europe/Switzerland/Zurich
    to
    date.timezone = Europe/Zurich

    and restarted the zabbix server.

    all errors related to timezone are gone and my zabbix is now having the new dashboard clean, without any errors.


    i am leaving this post here if someone comes across the same issue.

    beck

    Comment

    • kloczek
      Senior Member
      • Jun 2006
      • 1771

      #3
      Originally posted by mbeck
      Hi,
      I found the solution also after digging a few forums. well i changed the following in php.ini (/etc/php5/apache2/php.ini and in /etc/php5/cli/php.ini)

      from date.timezone = Europe/Switzerland/Zurich
      to
      date.timezone = Europe/Zurich

      and restarted the zabbix server.

      all errors related to timezone are gone and my zabbix is now having the new dashboard clean, without any errors.


      i am leaving this post here if someone comes across the same issue.

      beck
      BTW. On some hosts php is uses by many applications and it may be not wise to put zabbix web frontend settings straight in global php.ini.
      In such cases better is use apache per directory settings.
      Example part which defines vhost and adds all php settings on directory bases which can be used on RH based Linuxes:
      Code:
      # cat /etc/httpd/conf.d/zabbix.conf 
      ## New Zabbix Frontend cfg
      Listen			zabbix.web:80
      NameVirtualHost		zabbix.web:80
      
      <VirtualHost zabbix.web:80>
      	ServerName	 zabbix.web
      	ServerAlias	monitoring.web
      	DocumentRoot	"/var/www/zabbix"
      
      	CustomLog logs/zabbix-access_log combined
      	ErrorLog logs/zabbix-error_log
      </VirtualHost>
      
      <Directory "/var/www/zabbix/">
      	Options		Indexes FollowSymLinks
      	AllowOverride	AuthConfig
      	Order		allow,deny
      	Allow		from all
      
      	php_value max_execution_time	900
      	php_value max_input_time	300
      	php_value memory_limit		10G
      	php_value post_max_size		32M
      	php_value upload_max_filesize	5M
      	php_value date.timezone		GMT
      </Directory>
      http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
      https://kloczek.wordpress.com/
      zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
      My zabbix templates https://github.com/kloczek/zabbix-templates

      Comment

      Working...