Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
While there may be other forms of documentation indicating how to install the memcache extension, the first place that many will look is in the module directory. There, INSTALL.txt desperately needs an update.
It provides invalid paths as examples, using sites/default/modules (which doesn't exist), or referencing *.inc files from sites/default/settings.php as "./include/*.inc", etc. For new administrators, this is frustrating.
Basically, the INSTALL.txt file appears as though it was hastily written, and written for a prior version of drupal.
Comment | File | Size | Author |
---|---|---|---|
#11 | Update_README_txt_for_Drupal_7_remove_INSTALLATION_txt-1536222-10.patch | 12.53 KB | helmo |
#4 | memcache_readme_d7.patch | 12.62 KB | quicksketch |
#3 | memcache_7.x_readme_updates-1536222-3.patch | 10.06 KB | JeffSheltren |
#1 | memcache_7.x_readme_updates-1536222-1.patch | 9.23 KB | JeffSheltren |
Comments
Comment #1
JeffSheltren CreditAttribution: JeffSheltren commentedI've updated the README.txt for 7.x, and we can probably apply most of the changes to the 6.x README, but I'll wait for some review before working on that.
I recommend that we get rid of INSTALLATION.txt and instead rely on only the README.txt and we can reference online docs as needed. If that's not an option, I can work on updating INSTALLATION.txt as well.
Patch attached with proposed README changes.
Comment #2
Tim Jones Toronto CreditAttribution: Tim Jones Toronto commentedThanks Jeff!
I agree with the idea to get rid of INSTALLATION.txt as you suggest.
Do we need to make mention to set memcache.hash_strategy="consistent" in PHP.INI extension e.g:
or is this now not needed?
Comment #3
JeffSheltren CreditAttribution: JeffSheltren commentedTim, I had intended to included a section on multiple servers but I forgot -- thanks for the reminder! See attached for an updated patch which includes a section describing setting 'consistent' hash strategy for multiple memcached servers.
Comment #4
quicksketchThanks @JeffSheltren for this significant update. I have to curse at Memcache module every time I install it on D7 because there aren't any instructions that are all in one place. This patch needed a reroll due to some conflicts, so I read through it all (sounds great!) and made a few more adjustments.
Instead of using examples like:
I switched all the examples to:
Making it so you can just copy/paste into settings.php anywhere. The settings.php file in D7 now individually sets variables within $conf one at a time, rather than using one big $conf = array(), we should do the same for consistency and ease.
Updating the title of this issue, it'd be great to remove the INSTALLATION.txt file also, almost all information there no longer applies since you can just yum/apt-get install memcached these days, no need for specific repositories.
Comment #5
Tim Jones Toronto CreditAttribution: Tim Jones Toronto commentedHi Jeff,
I forgot to post back on this sorry. I checked the work you did and it looks great.
Agree with the $conf changes, thanks @quicksketch.
This is a great update for setting up this module.
Thanks all!
Comment #6
imoreno CreditAttribution: imoreno commentedHi,
just wanted to say that i have installed memcash today using the readme file only and it went OK.
so if this worth something i can say the current version is helpful,
Itzhak
Comment #7
mgiffordI think this is a bit better than the older Lullabot article, but do really think that there should be a link to
http://www.thefanclub.co.za/how-to/how-install-memcached-on-ubuntu-for-d...
But a point back to the handbook is pretty essential - http://drupal.org/node/1131468
Think it's better to point folks to:
+ $conf['cache_backends'][] = 'sites/all/modules/contrib/memcache/memcache.inc';
These docs definitely need a clean up, along with the handbook. Lots of places where I'm not sure how D6 & D7 differ.
Comment #8
helmo CreditAttribution: helmo commented@quicksketch: neither patch nor git apply manage to apply your patch from #4. On which git version did you base this?
Comment #9
helmo CreditAttribution: helmo commented#1452966: INSTALLATION.txt outdated and redundant already addresses removing the INSTALLATION.txt
Comment #10
helmo CreditAttribution: helmo commentedI've noticed that the patch from #3 still applies just fine.
So I guess that the reason why @quicksketch thought he needed a reroll was some local change in code.
I've gone ahead and updated the pacth from #3 with the comments @quicksketch made in #4.
Please review and get this committed quickly to avoid more confusion.
Comment #11
helmo CreditAttribution: helmo commentedand now with the patch actually attached :)
Comment #12
Jeremy CreditAttribution: Jeremy commentedThanks! It didn't apply cleanly anymore, but I manually fixed that and did a little more cleanup. Committed:
http://drupalcode.org/project/memcache.git/commit/d341d88
Comment #13
quicksketchThanks @Jeremy!
Comment #14
Jeremy CreditAttribution: Jeremy commentedRe-opening -- the same cleanup should be done to the 6.x documentation.
Comment #15
asb CreditAttribution: asb commentedComing from #1014154: Incorrect documentation in README.txt because after installaion I got
PHP Fatal error: Class 'MemCacheDrupal' not found in /var/www/d7/includes/cache.inc on line 31 […]
As instructed in the closed issue, I had to use:
This resultes in an PHP Fatal error:
$conf['cache_backends'][] = 'sites/all/modules/memcache/memcache.inc';
Comment #16
Jeremy CreditAttribution: Jeremy commentedPlease see step #7 in INSTALL.txt where it states:
In your case, it sounds like you've put the memcache module somewhere else (
sites/default
orsites/all/contrib
for example).Comment #17
asb CreditAttribution: asb commentedNo, 'memcache.inc' ist at
./sites/all/modules/memcache/memcache.inc
.The point of my post was that I did follow the installation instructions and got an PHP Fatal error and a WSOD for that. The workaround is in a closed issue (#1014154) that points here with the purpose to fix the installation instructions.
Comment #18
JeffSheltren CreditAttribution: JeffSheltren commented@asb, if you were getting a WSOD with the suggested configuration, then it's likely that something else is wrong with your installation/settings. I can verify that using:
Works for me on multiple D7 sites.
If you're unable to get that to work, I suggest opening up a new issue for support.
Comment #19
asb CreditAttribution: asb commented@JeffSheltren: First I didn't notice the PHP Fatal error after enabling the memcache module; it does not cause a WSOD by itself, but it's in the logfiles (Drupal's watchdog and the webservers error.log). The WSOD came up in combination with a reverse proxy (Varnish). When investigating this WSOD, I came across the PHP Fatal error caused by the memcache module. After I applied the workaround from #1014154, the PHP Fatal error is gone, and varnish module can be enabled.
So varnish module was just an indicator for the broken configuration of memcache module, it does not cause the PHP Fatal error, but trying to enable varnish module caused a WSOD because of memcache's PHP Fatal error.
From my
./sites/default/settings.php
:Check if
memcache.inc
is at it's expected location, from the site's root folder:Comment #20
JeffSheltren CreditAttribution: JeffSheltren commented@asb, like I said, the configuration as described in the 7.x README is considered correct. If it's not working for you, then the best thing to do is open up a new issue to track the problem.
Comment #21
asb CreditAttribution: asb commentedRe-opening #1014154: Incorrect documentation in README.txt to fix "Incorrect documentation in README.txt" which points to this issue.
Comment #22
Jeremy CreditAttribution: Jeremy at Tag1 Consulting commentedBackported:
http://cgit.drupalcode.org/memcache/commit/?id=dbce2d5