Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1732702
  • 博文数量: 234
  • 博客积分: 4966
  • 博客等级: 上校
  • 技术积分: 3322
  • 用 户 组: 普通用户
  • 注册时间: 2006-11-13 01:03
文章分类

全部博文(234)

文章存档

2017年(2)

2016年(1)

2015年(8)

2014年(11)

2013年(44)

2012年(27)

2011年(22)

2010年(30)

2009年(37)

2008年(6)

2007年(45)

2006年(1)

分类: 系统运维

2013-06-14 16:38:34

在把gentoo系统全面升级之后,php也升级到了5.4,打开cacti有如下报错
cacti0.87g 使用php5.4出现错误的解决方法,错误内容为:PHP message: PHP Fatal error:  Call to undefined function session_unregister() in /var/www/cacti/site/lib/functions.php on line 410,修改functions.php 410行附近内容为:
解决办法:
functions.php原文件410行原内容
/* kill_session_var - kills a session variable using two methods -- session_unregister() and unset() */
function kill_session_var($var_name) {
        /* register_global = off: reset local settings cache so the user sees the new settings */
        session_unregister($var_name);

        /* register_global = on: reset local settings cache so the user sees the new settings */
        unset($_SESSION[$var_name]);
}

修改后的内容,把原文红色部分注释掉
/* kill_session_var - kills a session variable using two methods -- session_unregister() and unset() */
function kill_session_var($var_name) {
        /* register_global = off: reset local settings cache so the user sees the new settings */
        /* session_unregister($var_name); */

        /* register_global = on: reset local settings cache so the user sees the new settings */
        unset($_SESSION[$var_name]);
}


阅读(5064) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~