The error in the title is repeated every time I go to a page. I'm running drupal 7 and followed the readme instructions. I am running memcached daemon on the specified ip and ports. I am using PECL memcache extension v2.2.6
extension=memcache.so
extension=memcached.so
memcache.hash_strategy="consistent"
are enabled in my php.ini
in my settings.php I have only added these lines of code:
$conf['cache_backends'][] = 'sites/all/modules/memcache/memcache.inc';
$conf['cache_default_class'] = 'MemCacheDrupal';
$conf['cache_class_cache_form'] = 'DrupalDatabaseCache';
Comments
Comment #1
infines commentedAlso noticed that I'm getting this error when I try install the module (I'm not installing memcache admin module):
Notice: Undefined index: description in drupal_check_module() (line 1146 of /home/folioh/public_html/includes/install.inc).
(Currently using Extensions not available Either the memcache or memcached extensions must be installed in order to use memcache integration.)
Comment #2
catchPlease check the output of class_exists('Memcache'); and class_exists('Memcached') on your system.
Also add this debug just before this line in dmemcache.inc
Comment #3
rdickert commentedRestarting php-fpm solved it for me (Pressflow 7 on Ubuntu with Nginx with php-fpm). I'm not sure if this would apply to the standard php package. Try this if you just installed everything and got this error.
Command on Ubuntu:
/etc/init.d/php5-fpm restart #php-fpm only
Comment #4
yannisc commentedI have the same problem at 7.x-1.0 version.
class_exists('Memcached') reports "1".
Comment #5
yannisc commentedIt was my mistake! I was looking the wrong php.ini file!
Comment #6
Vic_ commentedI am also getting this error,
Im posting the link so you guys know where im coming from with this, im running a drupal 7 site.
the only difference is that im memcache on MAMP and not as daemon.
I am however getting the same error, I will be posting the solution here if I find it ;)
Comment #7
umeshpatil commentedTo get rid of this error I added "extension=memcache.so" in my "/etc/php5/apache2/php.ini" file , after that restart apache server by "/etc/init.d/apache2 restart".
Courtesy -
http://www.stevekarsch.com/node/2920
Comment #8
Saytan commentedHello there,
I would also be interested if you found the answer when you run MAMP as a server.
I have exactly the same error message, and adding extension=memcache.so in the php.ini doesn't help.
Thank you, bye.
Comment #9
dajjenCheck that you have the right settins in your settings.php file.
ex.
reload apache.
sudo service apache reloadComment #10
erikwebb commentedThis looks like a common problem with setup, especially on MAMP. Since this module only performs a class_exists(), there isn't much room for a bug to exist here.
Comment #11
infines commentedI am still getting these errors and I haven't even installed the memcache module!
Here is my setup:
CentOS 5.9
Drupal 7.19
Memcache 7.1.0
settings.php:
php.ini (located at /php.ini):
That is the entire contents of my php.ini file. What am I doing wrong?
Comment #12
infines commentedComment #13
erikwebb commentedCan you attach your phpinfo information?
Comment #14
infines commentedHere is a link to all the information:
*I have removed this link because I have removed the phpinfo.php file from my website! Please see comment #18 for a solution: http://drupal.org/node/1350978#comment-7117224
Comment #15
erikwebb commentedAccording to the phpinfo, you don't have either extension installed correctly.
If you do have extension=memcached.so in your php.ini file, maybe that file itself is missing?
Comment #16
infines commentedWeird my WHM Panel says I do...so...i know this must be a server issue and not really a memcached issue, but might you know why?
Comment #17
erikwebb commentedI'm not very familiar with WHM Panel, so I'm not sure I can take a guess.
Comment #18
infines commentedI fixed this. Just a note to anyone trying to figure it out. You need to edit the proper PHP file.
add a phpinfo.php file to your www or public_html directory containing this code:
<?php phpinfo(); ?>Then locate where the php.ini file is located and edit that file in that location to include extension=memcached.so
Then restart your server just in case!
This can also be done through whm, but I'm not going to include instructions on that.
Comment #19
infines commentedComment #20
docans commentedI am running WAMP with PHP 5.2. on windows. How do i install the PECL and memcache
Comment #21
infines commented@docans This is not the place for your question. I suggest you try Google.
Comment #22
erikwebb commentedI actually agree that we should have some link to Windows documentation in the README, but I do agree that's a separate issue from this.
Comment #23
infines commentedWAMP is on windows but it's just apache....so read the apache documentation on installing memcache/d.
Comment #23.0
infines commentedmemcache.hash_strategy="consistent"
was added
Comment #24
badzilla commentedAnother consideration here is you will get the error message using drush if you don't have the extension=memcache.so directive in your cli version of your php.ini file even if your Apache configuration is correct. This is because of course drush uses the command line version of PHP.
Comment #25
randell commentedFollow-up for #24: you may execute
php --inito determine the location of the cli version of your php.ini. It should show something like this on Windows 7:For posterity's sake, modifying
C:\Program Files\Drush\Php\php.inito addextension=php_memcache.dllthen copyingphp_memcache.dllinto theextdirectory of PHP in Drush didn't work for me. I had to add my XAMPP's PHP to the PATH environment variable so that it would look likeC:\xampp\php;C:\ProgramData\Drush\to make the error message go away in Drush.Comment #26
panditvarun20 commentedJust follow the link below. You will be able to successfully installed.
in place of nano use gedit to open a file.
Hope this will help you.
http://andrewdunkle.com/how-install-memcached-drupal-7
Comment #27
sstedman commentedFor me on Mac OS X Mavericks, my local site running fine through nginx/php-fpm, drush was registering errors with the CLI version of php:
Locally I was running php 5.4.
I needed to
brew install php54-memcachethen
php -r "echo php_ini_loaded_file();"to find my loaded CLI php.ini file.then
vim /etc/php.inienter
extension=/usr/local/Cellar/php54-memcache/2.2.7/memcache.soand save.No more errors.
Comment #28
motarski commentedsstedman, you are a life saver 10x :)
Comment #29
umeshsapariya commentedFor me it solved the issue by following below steps,
1. check if memcache PHP extension is enabled by running
get_loaded_extensions()2. if not just install PHP extension using sudo apt-get install php5.6-memcache
Comment #30
itdevshri commented#27 save the day for me.
Thanks @sstedman