In the memcache engine, at line 199, the memcache object is instanciated in the old php4 way with reference operator & as follow :
$this->memcache = & new Memcache;
This produce a php warning on php 5.2, as a notice I think, which prevent memcache to save the current page into the cache system.
The solution consists in removing the reference operator, since in php5, the new operator already return a reference. I will soon provide a patch modifying the deprecated instruction the following way :
$this->memcache = new Memcache;
Comments
Comment #1
raphael waeselynck commentedAs promised, here is the patch modifying the deprecated instruction.
Please let me know if anything does not work as it should.
Comment #2
JirkaRybka commentedQuestion is, whether it works on PHP4. Drupal 6 supports PHP4 as well.
Comment #3
raphael waeselynck commentedOkay, let me explain it more accurately. The problem occurs with another module using memcache : authcache.
authcache does not cache a page if it raises any warning.
@JirkaRybka: do you think the following is compatible with both PHP4 & PHP5?
Comment #4
raphael waeselynck commentedhere is a new patch based upon my previous proposition
Comment #5
sdelbosc commentedComment #6
andypostcan anyone test this with PHP 4? I'm going to commit this into 4 and 5 branches.
Drupal 7 require PHP 5.2.4 so commit #1 http://drupal.org/cvs?commit=443908
Comment #7
oranjer commentedsubscribe