Ad Widget

Collapse

Time zone issue [even after editing the conf file]

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Rahma.S
    Junior Member
    • Jun 2021
    • 17

    #1

    Time zone issue [even after editing the conf file]

    Hello Zabbix community .

    Today i try to create users. (it work before)

    But , i have a timezone issues.

    I put in php.ini the good time zone : Europe/Paris
    same in the @zabbix.conf in /etc/apahce2/conf...

    timedatectl is set for Paris.

    I restart all service : apache2 , Zabbix web service and server , even DB .
    I don't know why but i still have this issue.

    Any help are welcomed

    best regards

    specs :
    Ubuntu 18-04
    Zabbix 5.4.0
    PGSQL 13
    PHP 7.2
    Attached Files
    Last edited by Rahma.S; 10-08-2021, 12:51.
  • Rahma.S
    Junior Member
    • Jun 2021
    • 17

    #2
    ok i found it

    I log into the server itself and it work.

    With a Vpn/SSL access it seems not possible.

    Any idea how to fix timezone for external administration ?


    Comment

    • tim.mooney
      Senior Member
      • Dec 2012
      • 1427

      #3
      Originally posted by Rahma.S
      I put in php.ini the good time zone : Europe/Paris
      same in the @zabbix.conf in /etc/apahce2/conf...

      specs :
      Ubuntu 18-04
      Zabbix 5.4.0
      PGSQL 13
      PHP 7.2
      Although the example Zabbix Apache httpd config may still be setting a "php_value date.timezone <something>", if your install is using PHP-FPM (separate PHP fastcgi worker pool) rather than mod_php, the php_value in httpd.conf will be ignored. Using php_value in a httpd.conf file only works if you're still using mod_php, and that is no longer the preferred way to run Apache + php. The PHP developers have been recommending using PHP-FPM for several years now.

      Setting it in the php.ini should work but if you are using PHP-FPM, the worker pool of PHP processes won't notice the change to php.ini until you restart that group of processes. That may be the only step you missed; Look to see if your system is running a group of PHP worker processes, something like:

      Code:
      $ ps -ef | grep -i php
      root 357592 1 0 Apr29 ? 00:05:12 php-fpm: master process (/etc/php-fpm.conf)
      apache 1382766 357592 0 12:07 ? 00:00:43 php-fpm: pool www
      apache 1383245 357592 0 13:23 ? 00:00:33 php-fpm: pool www
      apache 1383247 357592 0 13:23 ? 00:00:33 php-fpm: pool www
      apache 1383248 357592 0 13:23 ? 00:00:33 php-fpm: pool www
      apache 1383251 357592 0 13:23 ? 00:00:34 php-fpm: pool www
      apache 1383252 357592 0 13:23 ? 00:00:32 php-fpm: pool www
      apache 1383499 357592 0 14:06 ? 00:00:27 php-fpm: pool www
      apache 1383500 357592 0 14:06 ? 00:00:27 php-fpm: pool www
      apache 1383501 357592 0 14:06 ? 00:00:27 php-fpm: pool www
      apache 1383502 357592 0 14:06 ? 00:00:27 php-fpm: pool www
      If you do have php-fpm processes running, that's what you need to restart.

      Note also that you can set PHP settings on a per worker pool basis. Look near the end of /etc/php-fpm.d/www.conf or whatever pool name is used for your worker pool (it might be 'zabbix'). At the end of that file, you may see examples of how to set PHP overrides that only apply to that pool.

      Comment

      Working...