由于安全原因,putenv()已被禁用 putenv() has been disabled for security reasons

时间:2024-03-17 12:57:45

putenv() has been disabled for security reasons [srv_status.php:22 → require_once() → ZBase->run() →

Zabbix部署错误之putenv
测试环境

CentOS-7-x86_64-DVD-1810.iso
宝塔面板 6.9.8
LNMP
Nginx 1.16.0
MySQL 5.7.26
PHP-7.2
Zabbix

Zabbix报错了

putenv() has been disabled for security reasons [srv_status.php:22 → require_once() → ZBase->run() → ZBase->initLocales() → putenv() in include/classes/core/ZBase.php:331]
putenv() has been disabled for security reasons [srv_status.php:22 → require_once() → ZBase->run() → ZBase->initLocales() → putenv() in include/classes/core/ZBase.php:332]
putenv() has been disabled for security reasons [srv_status.php:22 → require_once() → ZBase->run() → ZBase->initLocales() → putenv() in include/classes/core/ZBase.php:333]

由于安全原因,putenv()已被禁用 putenv() has been disabled for security reasons

问题分析

putenv()出于安全原因被禁用了。

解决方案

宝塔面板|软件商店|PHP对应版本的设置中:
禁用函数里面,删除putenv。

由于安全原因,putenv()已被禁用 putenv() has been disabled for security reasons