博客
关于我
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模块
你可能感兴趣的文章
MFC模态对话框和非模态对话框
查看>>
Moment.js常见用法总结
查看>>
MongoDB出现Error parsing command line: unrecognised option ‘--fork‘ 的解决方法
查看>>
mxGraph改变图形大小重置overlay位置
查看>>
MongoDB可视化客户端管理工具之NoSQLbooster4mongo
查看>>
Mongodb学习总结(1)——常用NoSql数据库比较
查看>>
MongoDB学习笔记(8)--索引及优化索引
查看>>
mongodb定时备份数据库
查看>>
mppt算法详解-ChatGPT4o作答
查看>>
mpvue的使用(一)必要的开发环境
查看>>
MQ 重复消费如何解决?
查看>>
mqtt broker服务端
查看>>
MQTT 保留消息
查看>>
MQTT 持久会话与 Clean Session 详解
查看>>
MQTT工作笔记0007---剩余长度
查看>>
MQTT工作笔记0009---订阅主题和订阅确认
查看>>
Mqtt搭建代理服务器进行通信-浅析
查看>>
MS Edge浏览器“STATUS_INVALID_IMAGE_HASH“兼容性问题
查看>>
ms sql server 2008 sp2更新异常
查看>>
MS UC 2013-0-Prepare Tool
查看>>