I'm getting the following error when running update.php after updating a module:
Fatal error: Cannot redeclare dmemcache_set() (previously declared in /etc/drupal7/all/modules/memcache/dmemcache.inc:40) in /etc/drupal7/xxxxxxx.yyyyyy.local/modules/memcache/dmemcache.inc on line 84
The update screen goes white with the above error message shown at the top. Back-arrow can sometimes fix the problem....the update script seems to run to completion.
The system is CentOS 6.6 with everything up to date. PECL Memcache 3.0.8.
Comments
Comment #1
jeremy commentedIt sounds like you may have configured memcache incorrectly in settings.php. Please review the README.txt that comes with the module and make sure that's how you configured settings.php. If you're not sure, post the applicable section of your settings.php here.
Comment #2
lostchord commentedThis is new behaviour after several months of use, but user error is something I'm good at :-)
Here is the settings section:
Comment #3
jeremy commentedThat configuration should be correct.
Do you have any other modules enabled relating to caching? Do you modify these or any other cache variables elsewhere in your settings.php?
Does this happen every time you run update.php, or just for a specific module? Are you able to duplicate it repeatedly?
What version of the memcache module were you using prior to upgrading to 7.x-1.4? It's possible you have corrupt data in your cache from an earlier version, and simply restarting the memcache daemon one time could fix this...
Comment #4
lostchord commentedPrevious version was 1.3.
I am also using APC, settings are:
I updated Rules at the same time as Memcache and I've had some quirky behaviour with rules and memcache in another environment....so this is what I have tried so far:
Will reverting to 1.3 be of any interest?
Edit: The 500 errors in the apache error log are basically the same as the original error and an attempt to re-enable memcache generates this error.
Comment #5
jeremy commentedCan you test disabling APC (remove it from settings.php and restart Apache), does that solve the problem?
And yes, if you're able to try w/ 1.3 to see if that solves the problem, that's another useful data point.
Currently I'm unable to duplicate, so it's difficult to debug. The more detail we can collect the better, best is if I can find a consistent way to duplicate.
So this happens every time you run update.php? Or it happened until a certain update ran?
Comment #6
lostchord commentedI will see if I can get some more information over the coming weekend. I'm using CentOS and the EPEL distribution of Drupal as a starting point.
It started with the last batch of updates I applied which included Memcache and (amongst others) Rules. No problems before that. Now it happens all the time.
I did not snapshot the VM before applying the updates - it's R&D rather than production - but I will roll-back all the applied updates and uninstall the modules and then re-apply them up to the point before the last batch of updates.
I'm only highlighting Rules because I had some other issues when I first installed it in another environment with Memcache and APC enabled. The install white-screened, cannot recall the actual errors at the time, and I eventually solved by by turning off ALL cache related features, installing Rules, then turning things on again.
If I can find something that can reproduce it from scratch I will post details here.
Comment #7
jeremy commentedThanks @lostchord, that's very helpful.
Comment #8
jeremy commentedUnable to replicate; no further data -- closing.