博客
关于我
PHP 7.X 安装Zabbix 3.X问题解决
阅读量:108 次
发布时间:2019-02-25

本文共 1479 字,大约阅读时间需要 4 分钟。

安装好zabbix后,出现以下问题:

A non well formed numeric value encountered [zabbix.php:21 → require_once() → ZBase->run() → ZBase->processRequest() → CView->getOutput() → include() → make_status_of_zbx() → CFrontendSetup->checkRequirements() → CFrontendSetup->checkPhpMemoryLimit() → str2mem() in include/func.inc.php:410]
A non well formed numeric value encountered [zabbix.php:21 → require_once() → ZBase->run() → ZBase->processRequest() → CView->getOutput() → include() → make_status_of_zbx() → CFrontendSetup->checkRequirements() → CFrontendSetup->checkPhpPostMaxSize() → str2mem() in include/func.inc.php:410]
A non well formed numeric value encountered [zabbix.php:21 → require_once() → ZBase->run() → ZBase->processRequest() → CView->getOutput() → include() → make_status_of_zbx() → CFrontendSetup->checkRequirements() → CFrontendSetup->checkPhpUploadMaxFilesize() → str2mem() in include/func.inc.php:410]

这里写图片描述

安装完成之后启动就出现这个问题,这个是因为PHP 7.X类型强化,处理方法也很简单找到zabbix 安装目录下zabbix/include/func.inc.php文件

[root@linux-node3 include]# pwd/home/wwwroot/zabbix/include[root@linux-node3 include]# cp func.inc.php func.inc.php.bak [root@linux-node3 include]# sed -i '/$last = strtolower(substr($val, -1));/a$val = substr($val,0,-1);' func.inc.php

修改完后,刷新页面,效果如下:

这里写图片描述

备注:

如果有一下报错

zabbix server is not running:the information displayed may not be current

一般是由于php.ini文件的fsockopen模块没有启动的问题

启用fsockopen模块的方法:

php.ini文件中查找allow_url_fopen = On   #改为Onextension=php_openssl.dll    #去掉分号,如果去掉分号重启php有警告,可以编译openssl模块
你可能感兴趣的文章
MySQL中group by 与 order by 一起使用排序问题
查看>>
mysql中having的用法
查看>>
MySQL中interactive_timeout和wait_timeout的区别
查看>>
mysql中int、bigint、smallint 和 tinyint的区别、char和varchar的区别详细介绍
查看>>
mysql中json_extract的使用方法
查看>>
mysql中json_extract的使用方法
查看>>
mysql中kill掉所有锁表的进程
查看>>
mysql中like % %模糊查询
查看>>
MySql中mvcc学习记录
查看>>
mysql中null和空字符串的区别与问题!
查看>>
MySQL中ON DUPLICATE KEY UPDATE的介绍与使用、批量更新、存在即更新不存在则插入
查看>>
MYSQL中TINYINT的取值范围
查看>>
MySQL中UPDATE语句的神奇技巧,让你操作数据库如虎添翼!
查看>>
Mysql中varchar类型数字排序不对踩坑记录
查看>>
MySQL中一条SQL语句到底是如何执行的呢?
查看>>
MySQL中你必须知道的10件事,1.5万字!
查看>>
MySQL中使用IN()查询到底走不走索引?
查看>>
Mysql中使用存储过程插入decimal和时间数据递增的模拟数据
查看>>
MySql中关于geometry类型的数据_空的时候如何插入处理_需用null_空字符串插入会报错_Cannot get geometry object from dat---MySql工作笔记003
查看>>
mysql中出现Incorrect DECIMAL value: '0' for column '' at row -1错误解决方案
查看>>