cacti err

[cacti@yl133 ~]$/usr/local/php/bin/php   /usr/local/apache2/htdocs/cacti/poller.php

PHP Deprecated:  Assigning the return value of new by reference is deprecated in /usr/local/apache2/htdocs/cacti/lib/adodb/adodb.inc.php on line 866
PHP Deprecated:  Assigning the return value of new by reference is deprecated in /usr/local/apache2/htdocs/cacti/lib/adodb/adodb.inc.php on line 872
PHP Deprecated:  Assigning the return value of new by reference is deprecated in /usr/local/apache2/htdocs/cacti/lib/adodb/adodb.inc.php on line 1183
PHP Deprecated:  Assigning the return value of new by reference is deprecated in /usr/local/apache2/htdocs/cacti/lib/adodb/adodb.inc.php on line 1961
PHP Deprecated:  Assigning the return value of new by reference is deprecated in /usr/local/apache2/htdocs/cacti/lib/adodb/adodb.inc.php on line 3027
PHP Deprecated:  Assigning the return value of new by reference is deprecated in /usr/local/apache2/htdocs/cacti/lib/adodb/adodb.inc.php on line 3592
PHP Deprecated:  Assigning the return value of new by reference is deprecated in /usr/local/apache2/htdocs/cacti/lib/adodb/adodb.inc.php on line 3667
PHP Deprecated:  Assigning the return value of new by reference is deprecated in /usr/local/apache2/htdocs/cacti/lib/adodb/adodb.inc.php on line 3687

很多人的解决办法很简单:把php版本换回老版本就ok了。

解决办法:php5.3开始后,废除了php中的”=&”符号,所以要想复制,直接用=引用即可。详细如下:

所以解决的办法就是 将出错的位置行中的“=&” 直接替换成“=”问题解决。

1、PHP5对象复制是采用引用的方式;
2、如果不采用引用方式,则需要在复制对象时加关键字 clone;
3、如果在复制的过程中,同时要变更某些属性,则增加函数_clone();

本文出自 “vatar” 博客,谢绝转载!

你可能感兴趣的:(PHP,error,职场,cacti,deprecated,休闲,1961,866,872,1183,adodb.inc.php,Assigning)