您的位置:首页 > 运维架构 > Linux

centos6.4x64安装cacti中出现的bug

2013-10-08 17:26 337 查看
领导叫我把安装好的cacti汉化一下,于是我傻乎乎的就去汉化了,当我汉化完之后就出事了,访问cacti,啥都没有,下面是报错日志:

PHP message: PHP Fatal error: Call to undefined function db_fetch_cell() in /usr/share/nginx/html/cacti/install/index.php on line 37" while reading response header from upstream, client: 192.168.1.111, server: 192.168.1.31, request: "GET /cacti/install/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.31"
2013/10/08 16:29:23 [error] 1459#0: *4 FastCGI sent in stderr: "PHP message: PHP Warning: include(): open_basedir restriction in effect. File(/usr/share/nginx/html/cacti/include/global.php) is not within the allowed path(s): (.:/tmp/) in /usr/share/nginx/html/cacti/install/index.php on line 25
PHP message: PHP Warning: include(/usr/share/nginx/html/cacti/include/global.php): failed to open stream: Operation not permitted in /usr/share/nginx/html/cacti/install/index.php on line 25
PHP message: PHP Warning: include(): Failed opening '../include/global.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /usr/share/nginx/html/cacti/install/index.php on line 25
PHP message: PHP Fatal error: Call to undefined function db_fetch_cell() in /usr/share/nginx/html/cacti/install/index.php on line 37" while reading response header from upstream, client: 192.168.1.111, server: 192.168.1.31, request: "GET /cacti/install/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.31"

我把能改的都改了,调内存,改路径,可是还是显示空白页,这个问题困扰了我一个假期,后来我把php.ini的一个选项给注释了就没事了

;open_basedir = .:/tmp/

open_basedir可将用户访问文件的活动范围限制在指定的区域,通常是其家目录的路径,也
可用符号"."来代表当前目录。注意用open_basedir指定的限制实际上是前缀,而不是目录名。
举例来说: 若"open_basedir = /dir/user", 那么目录 "/dir/user" 和 "/dir/user1"都是
可以访问的。所以如果要将访问限制在仅为指定的目录,请用斜线结束路径名。例如设置成:
"open_basedir = /dir/user/"

open_basedir也可以同时设置多个目录, 在Windows中用分号分隔目录,在任何其它系统中用
冒号分隔目录。当其作用于Apache模块时,父目录中的open_basedir路径自动被继承。

我看网上写的全是mysql或者是内存的事,弄的我那叫一个狼狈呀,害我弄了好几天,原来就是一个“ ;”的事.......

我打开cacti页面,看到了久违的页面,感慨万分,可是发现

cacti安装完成后图片不显示(显示红叉)

这叫一个坑爹呀,于是我查了一下,

yum -y install rrdtool fetch gd-devel

原来我是gd-devel这个套件没装

如果重启服务之后不行的话,再执行一下这个
/usr/local/php/bin/php /usr/local/apach2/htdocs/cacti/poller.php
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息