I´ve cloned my production site in a local Xampp installation. My site has Memcached installed (in the server and I´ve got the drupal memcache module installed).

But I´ve got this error at my local site:

You must enable the PECL memcached or memcache extension to use memcache.inc

(this is repeated at least 30 times, so that line is printed about 30 times at the top of every page).

Now, I´ve disable and unninstalled memcache at my local installation, and the error is still there.

I´ve tried after that deleting the additional settings added to my settings config file:

$conf['cache_backends'][] = 'sites/all/modules/memcache/memcache.inc'; $conf['cache_default_class'] = 'MemCacheDrupal'; $conf['memcache_key_prefix'] = 'memcache_sitio'; $conf['cache_class_cache_form'] = 'DrupalDatabaseCache';

But if I do eliminate those lines (after I´ve uninstalled -not only disabled- memcached module), I get WSOD and this error:

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in C:\Users\Vic\Desktop\XAMPP\htdocs\drupal\includes\database\database.inc:2139 Stack trace: #0 C:\Users\Vic\Desktop\XAMPP\htdocs\drupal\includes\database\database.inc(2139): PDOStatement->execute(Array) #1 C:\Users\Vic\Desktop\XAMPP\htdocs\drupal\includes\database\database.inc(664): DatabaseStatementBase->execute(Array, Array) #2 C:\Users\Vic\Desktop\XAMPP\htdocs\drupal\includes\database\database.inc(2318): DatabaseConnection->query('SELECT expire, ...', Array, Array) #3 C:\Users\Vic\Desktop\XAMPP\htdocs\drupal\includes\lock.inc(167): db_query('SELECT expire, ...', Array) #4 C:\Users\Vic\Desktop\XAMPP\htdocs\drupal\includes\lock.inc(146): lock_may_be_available('schema:runtime:...') #5 C:\Users\Vic\Desktop\XAMPP\htdocs\drupal\includes\bootstrap.inc(405): lock_acquire('schema:runtime:...') #6 C:\Users\Victoria in C:\Users\Vic\Desktop\XAMPP\htdocs\drupal\includes\database\database.inc on line 2139

Please note that I´ve deleted all cache, tried disabling (and enabling) all performance options, and I´ve run run cron more than once.

What should I do? Thanks!


2 Answers 2


Each time I saw the "Mysql server has gone away" error, it was caused by the max_allowed_packet setting (in the my.ini setting file) that was too small.


Found the solution!! It´s here: http://stannesi.blogspot.com.ar/2011/11/how-to-install-memcache-on-xampp.html

In a nutshell: My Xampp php didn´t have any memcache extension, so, I have to add it:

After all the extensions declared in my php.ini file, I´ve added this:

memcache.allow_failover = 1  
memcache.chunk_size =8192  
memcache.default_port = 11211

After that I have to download the php_memcache extension (php_memcache.dll) and put it inside php/ext folder, in my Xampp installation.

And that was it!!

Hope this helps out someone, somewhere :)

Not the answer you're looking for? Browse other questions tagged or ask your own question.