«

报错:Warning: putenv() has been disabled for security reasons in /www/wwwroot/www.baidu.com/thinkphp/base.php on line 50

IT中华 发布于 阅读:480 自动采集


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

putenv() has been disabled for security reasons [srv_status.php:22 → require_once() → ZBase->run() →
————————————————
部署错误之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()出于安全原因被禁用了。

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

推荐阅读:


扫描二维码,在手机上阅读