Ad Widget

Collapse

Zabbix 5.0 install Failing php timezone unknown

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tpolim008
    Junior Member
    • Aug 2020
    • 3

    #1

    Zabbix 5.0 install Failing php timezone unknown

    Hello, I have recently installed Zabbix on centos 8, when going thru the front end install I get the error php date timezone unknown fail. I have updated all possible PHP.ini files along with the Zabbix config file, ive removed the ; at the front of every file not sure if this is needed or not. Here is a list of files which I have altered for PHP

    list of altered PHP files for timezone and removed the ; at the start
    /etc/php.ini
    /etc/php.ini.rpmnew
    /etc/php.ini.rpmsave
    /etc/opt/remi/php74/php.ini
    /opt/etc/php.ini
    /opt/remi/php74/root/usr/share/doc/php74-php-common/php.ini-development
    /opt/remi/php74/root/usr/share/doc/php74-php-common/php.ini-production
    /usr/share/doc/php-common/php.ini-development
    /usr/share/doc/php-common/php.ini-production
    [root@netengsrv01 ~]#

    root@netengsrv01 ~]# nano /etc/php-fpm.d/zabbix.conf
    GNU nano 2.9.8 /etc/php-fpm.d/zabbix.conf

    [zabbix]
    user = apache
    group = apache

    listen = /run/php-fpm/zabbix.sock
    listen.acl_users = apache,nginx
    listen.allowed_clients = 127.0.0.1

    pm = dynamic
    pm.max_children = 50
    pm.start_servers = 5
    pm.min_spare_servers = 5
    pm.max_spare_servers = 35

    php_value[session.save_handler] = files
    php_value[session.save_path] = /var/lib/php/session

    php_value[max_execution_time] = 300
    php_value[memory_limit] = 128M
    php_value[post_max_size] = 16M
    php_value[upload_max_filesize] = 2M
    php_value[max_input_time] = 300
    php_value[max_input_vars] = 10000
    php_value[date.timezone] = America/New_York <<<<<<<<<<<<<


    Check of pre-requisites
    • Time zone for PHP is not set (configuration parameter "date.timezone").
    PHP version 7.4.9 7.2.0 OK
    PHP option "memory_limit" 128M 128M OK
    PHP option "post_max_size" 16M 16M OK
    PHP option "upload_max_filesize" 2M 2M OK
    PHP option "max_execution_time" 300 300 OK
    PHP option "max_input_time" 300 300 OK
    PHP option "date.timezone" unknown Fail
    PHP databases support MySQL OK
    PHP bcmath on OK
    PHP mbstring on OK
    PHP option "mbstring.func_overload" off off OK
    PHP sockets on OK
    PHP gd 2.2.5 2.0 OK
    PHP gd PNG support on OK
    PHP gd JPEG support on OK
    PHP gd GIF support on OK
    PHP gd FreeType support on OK
    PHP libxml 2.9.7 2.6.15 OK
    PHP xmlwriter on OK
    PHP xmlreader on OK
    PHP LDAP on OK
    PHP OpenSSL on OK
    PHP ctype on OK
    PHP session on OK
    PHP option "session.auto_start" off off OK
    PHP gettext on OK
    PHP option "arg_separator.output" & & OK
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    The setting in the php-fpm pool will override the system-wide setting from php.ini, but you need to restart the php-fpm service after changing any of the parameters in the pool configuration file.

    Also, having multiple installs of PHP on your system is just a recipe for confusion. Figure out which PHP you want to use, and remove the other ones. Clean up any config files that are left behind by the PHP version(s) you uninstall, so they're not left around to confuse you and your coworkers.

    The .rpmnew and .rpmsave files are created by the package manager (it's RPM, under the hood, even if you use yum or dnf as the interface) and they're generally ignored by PHP.

    Once you have just one copy of PHP installed, you can see what paths it claims using a command like

    Code:
    rpm -q -l php-common
    (assuming that the package name for the common PHP components needed by the other parts of PHP is 'php-common'). You can use that rpm query (-q) with long output (-l) on any package name, to find what files it "owns".

    Comment

    • tpolim008
      Junior Member
      • Aug 2020
      • 3

      #3
      So I'm at a loss here or confused. I have fully removed php from my system and installed php7 only, still having the same issue... the php-fpm file doesn't have a timezone listed its references to another file that again no timezone area. Do you have any idea what php.ini I need to locate and update to make this work? Even after the below it still fails.

      root@netengsrv01 ~]# php -v
      PHP 7.4.9 (cli) (built: Aug 4 2020 08:28:13) ( NTS )
      Copyright (c) The PHP Group
      Zend Engine v3.4.0, Copyright (c) Zend Technologies
      with Zend OPcache v7.4.9, Copyright (c), by Zend Technologies
      [root@netengsrv01 ~]# sudo systemctl start php-fpm
      [root@netengsrv01 ~]# sudo systemctl enable php-fpm
      [root@netengsrv01 ~]# sudo systemctl restart httpd
      [root@netengsrv01 ~]#

      [root@netengsrv01 ~]# yum list installed | grep php
      oniguruma5php.x86_64 6.9.5+rev1-2.el8.remi @remi-safe
      php.x86_64 7.4.9-1.el8.remi @remi-modular
      php-bcmath.x86_64 7.4.9-1.el8.remi @remi-modular
      php-cli.x86_64 7.4.9-1.el8.remi @remi-modular
      php-common.x86_64 7.4.9-1.el8.remi @remi-modular
      php-fpm.x86_64 7.4.9-1.el8.remi @remi-modular
      php-gd.x86_64 7.4.9-1.el8.remi @remi-modular
      php-json.x86_64 7.4.9-1.el8.remi @remi-modular
      php-ldap.x86_64 7.4.9-1.el8.remi @remi-modular
      php-mbstring.x86_64 7.4.9-1.el8.remi @remi-modular
      php-mysqlnd.x86_64 7.4.9-1.el8.remi @remi-modular
      php-opcache.x86_64 7.4.9-1.el8.remi @remi-modular
      php-pdo.x86_64 7.4.9-1.el8.remi @remi-modular
      php-sodium.x86_64 7.4.9-1.el8.remi @remi-modular
      php-xml.x86_64 7.4.9-1.el8.remi @remi-modular
      [root@netengsrv01 ~]#

      Comment

      • tpolim008
        Junior Member
        • Aug 2020
        • 3

        #4
        after tons more of digging it had to be in such format "America/New_York"

        Comment

        Working...