php升级到5.3.2后的处理

PHP: 5.3.2-1ubuntu4 with Suhosin-Patch (cli)
cacti: Version 0.8.7e
ubuntu: server 10.04 32bit

ubuntu server 从8.04升级到10.04后,php也升级到5.3.2,结果问题就来了。前3个是cacti的问题

1.登录页面提示:
Deprecated: Function ereg_replace() is deprecated in /usr/share/cacti/site/include/global.php on line 89

解决:
/etc/php5/apache2/php.ini 的,把
;mbstring.func_overload = 0
修改为:
mbstring.func_overload = 7

2.登录页面提示:
Warning: Cannot modify header information - headers already sent by (output started at /usr/share/cacti/site/include/global.php:89) in /usr/share/cacti/site/include/global.php on line 120
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /usr/share/cacti/site/include/global.php:89) in /usr/share/cacti/site/include/global.php on line 130

解决:
/etc/php5/apache2/php.ini 的,把
output_buffering = Off
改成
output_buffering = 4096

3.登录后提示:
Deprecated: Function session_unregister() is deprecated in /usr/share/cacti/site/lib/functions.php on line 359

解决:
/usr/share/cacti/site/lib/functions.php 的359行,把
session_unregister($var_name);
改成
$_SESSION[$var_name] = null;

4.Zend Optimizer 3.3.9 用不了

解决:
暂时不支持 php 5.3.2 ,换到php 5.2.* 吧。 @_@

发表评论

电子邮件地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据