zabbix时区提示错误
2024-11-04 15:38:06 # 技术笔记

更改php.ini配置文件的设置,去掉date.timezone的注释,将时区改为Asia/Shanghai

1
vim /etc/php.ini 
1
2
3
4
5
6
7
8
[Date]

; Defines the default timezone used by the datefunctions

; http://php.net/date.timezone


date.timezone=Asia/Shanghai

将最前面的分号去掉,上面时区改成亚洲上海。

查看并修改/etc/httpd/conf.d/zabbix.conf配置文件的配置

1
vim /etc/httpd/conf.d/zabbix.conf 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Options FollowSymLinksAllowOverride None

Order allow,deny

Allow from all

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 date.timezone Asia/Shanghai

重启httpd服务

1
systemctl restart httpd 

重新刷新网页即可