Configure the PHP front end

Video Lecture

Configure the PHP front end Configure the PHP front end Configure the PHP front end

Description

The commands in this video are,

Ubuntu 20.04, 18.04

1
sudo nano /etc/zabbix/apache.conf

Centos 8, 7

1
sudo nano /etc/php-fpm.d/zabbix.conf

or

1
sudo nano /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf

or

1
sudo nano /etc/httpd/conf.d/zabbix.conf

Note

If you get an error that nano is not installed,

Ubuntu: sudo apt install nano

Centos 8: yum install nano

Centos 7: dnf install nano

Scroll down and uncomment the lines

1
# php_value date.timezone Europe/Riga

and edit to your time zone.

My time zone is London, so my line looks like,

1
php_value date.timezone Europe/London

PHP timezone strings can be found here,

https://www.php.net/manual/en/timezones.php

Warning

If you installed your Zabbix Server using the NGINX web server option then your time zone settings may be in the file /etc/php.d/99-zabbix.ini

Troubleshooting

Q. You see the error 'Time zone for PHP is not set (configuration parameter "date.timezone").'

A. You most likely didn't remove the comment symbol (#) from the line containing php_value date.timezone and your time zone.