在把
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]);
}
阅读(5148) | 评论(0) | 转发(0) |