安装zabbix3.2过程中遇到的一些问题&解决方案

第一次尝试打开

[Thu Jan 1114:15:30.301277 2018] [:error] [pid 16725] [client 183.157.56.86:60232] PHPWarning:  require_once(): open_basedirrestriction in effect. File(/etc/zabbix/web/maintenance.inc.php) is not withinthe allowed path(s): (.:/tmp/) in/usr/share/zabbix/include/classes/core/ZBase.php on line 269

[Thu Jan 1114:15:30.301327 2018] [:error] [pid 16725] [client 183.157.56.86:60232] PHPWarning: require_once(/etc/zabbix/web/maintenance.inc.php): failed to openstream: Operation not permitted in /usr/share/zabbix/include/classes/core/ZBase.phpon line 269

[Thu Jan 1114:15:30.301334 2018] [:error] [pid 16725] [client 183.157.56.86:60232] PHPFatal error:  require_once(): Failedopening required '/etc/zabbix/web/maintenance.inc.php'(include_path='.:/usr/share/pear:/usr/share/php') in/usr/share/zabbix/include/classes/core/ZBase.php on line 269

[Thu Jan 1114:15:31.515161 2018] [:error] [pid 16726] [client 183.157.56.86:60234] PHPWarning:  require_once(): open_basedirrestriction in effect. File(/etc/zabbix/web/maintenance.inc.php) is not withinthe allowed path(s): (.:/tmp/) in/usr/share/zabbix/include/classes/core/ZBase.php on line 269

[Thu Jan 1114:15:31.515207 2018] [:error] [pid 16726] [client 183.157.56.86:60234] PHPWarning: require_once(/etc/zabbix/web/maintenance.inc.php): failed to openstream: Operation not permitted in /usr/share/zabbix/include/classes/core/ZBase.phpon line 269

[Thu Jan11 14:15:31.515214 2018] [:error] [pid 16726] [client 183.157.56.86:60234] PHPFatal error:  require_once(): Failedopening required '/etc/zabbix/web/maintenance.inc.php'(include_path='.:/usr/share/pear:/usr/share/php') in/usr/share/zabbix/include/classes/core/ZBase.php on line 269

 

/usr/share/zabbix/include/classes/core/ZBase.php中格式不对,少了结尾的?>

 

第二次:访问出现http错误代码500

[Thu Jan 1114:28:57.181106 2018] [:error] [pid 16725] [client 183.157.56.86:62058] PHPWarning:  require_once(): open_basedirrestriction in effect. File(/etc/zabbix/web/maintenance.inc.php) is not withinthe allowed path(s): (.:/tmp/) in/usr/share/zabbix/include/classes/core/ZBase.php on line 269

[Thu Jan 1114:28:57.181155 2018] [:error] [pid 16725] [client 183.157.56.86:62058] PHPWarning: require_once(/etc/zabbix/web/maintenance.inc.php): failed to openstream: Operation not permitted in /usr/share/zabbix/include/classes/core/ZBase.phpon line 269

[Thu Jan 1114:28:57.181163 2018] [:error] [pid 16725] [client 183.157.56.86:62058] PHPFatal error:  require_once(): Failedopening required '/etc/zabbix/web/maintenance.inc.php'(include_path='.:/usr/share/pear:/usr/share/php') in/usr/share/zabbix/include/classes/core/ZBase.php on line 269

 

/etc/php.ini中的open_basedir前加上 ; 号,不限制访问权限

open_basedir这个是用来限制php的目录访问权限什么的,如果不在允许的范围内,php就不能访问。

 

经过修改网站可以访问了,但是网页顶端出现了维护模式的语句

// Maintenance mode//define('ZBX_DENY_GUI_ACCESS', 1); // IP range, who are allowed to connect toFrontEnd //$ZBX_GUI_ACCESS_IP_RANGE = array('127.0.0.1'); // MSG shown onWarning screen! //$_REQUEST['warning_msg'] = 'Zabbix is under maintenance.';

 

原因:

   php格式

xxxxxxxx

?>

之前在**/后面添加了?>导致后面一段内容没有被框进去,导致代码溢出


你可能感兴趣的:(Linux高级)