Upgrading PECL Memcache
Everytime I go to the Drupal status page of my local dev, I see this message:
There is a problem with your memcache configuration. Please review README.txt for help resolving the following issue: PECL Memcache version 2.2.7 is unsupported. Please update to 3.0.6 or newer.
Let’s check info on installed version:
pecl info memcache
About pecl.php.net/memcache-2.2.7
=================================
Release Type PECL-style PHP extension (source code)
Name memcache
Channel pecl.php.net
Summary memcached extension
Description Memcached is a caching daemon designed
especially for
dynamic web applications to decrease database
load by
storing objects in memory.
This extension allows you to work with
memcached through
handy OO and procedural interfaces.
Maintainers Antony Dovgal <tony@daylessday.org> (lead,
inactive)
Mikael Johansson <mikael@synd.info> (lead)
Herman Radtke <hradtke@php.net> (lead)
Release Date 2012-09-23 01:51:08
Release Version 2.2.7 (stable)
API Version 2.2.7 (stable)
License PHP License (http://www.php.net/license)
Release Notes - PHP 5.4 compatibility
- Fixed return value error
get_host_port_from_server().
- Fixed PECL Bug #16672 (memcache.php doesn't
support unix socket)
- Fixed pecl bug #19374 (memcache.php throws
Notice: Undefined index: VALUE when viewing
expired items)
Required Dependencies PHP version 4.3.11
PEAR installer version 1.4.0b1 or newer
package.xml version 2.0
Last Modified 2014-04-01 15:57
Previous Installed - None -
Version
Let’s check the latest available version:
pecl remote-info memcache
Package details:
================
Latest 3.0.8
Installed 2.2.7
Package memcache
License PHP License
Category Caching
Summary memcached extension
Description Memcached is a caching daemon designed
especially for
dynamic web applications to decrease
database load by
storing objects in memory.
This extension allows you to work with
memcached through
handy OO and procedural interfaces.
Now, let’s try to upgrade this.
sudo pecl upgrade memcache
Nothing to upgrade
I guess we can’t upgrade. Let’s uninstall the old version and install the latest version.
sudo pecl uninstall memcache
Unable to remove "extension=memcache.so" from php.ini
uninstall ok: channel://pecl.php.net/memcache-2.2.7
Install specific version:
sudo pecl install memcache-3.0.8
downloading memcache-3.0.8.tgz ...
Starting to download memcache-3.0.8.tgz (70,523 bytes)
.................done: 70,523 bytes
15 source files, building
running: phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
Build complete.
Don't forget to run 'make test'.
running: make INSTALL_ROOT="/tmp/pear/temp/pear-build-rootdfXhAS/install-memcache-3.0.8" install
Installing shared extensions: /tmp/pear/temp/pear-build-rootdfXhAS/install-memcache-3.0.8/usr/lib/php5/20090626+lfs/
running: find "/tmp/pear/temp/pear-build-rootdfXhAS/install-memcache-3.0.8" | xargs ls -dils
421768 4 drwxr-xr-x 3 root root 4096 Aug 16 13:31 /tmp/pear/temp/pear-build-rootdfXhAS/install-memcache-3.0.8
421804 4 drwxr-xr-x 3 root root 4096 Aug 16 13:31 /tmp/pear/temp/pear-build-rootdfXhAS/install-memcache-3.0.8/usr
421805 4 drwxr-xr-x 3 root root 4096 Aug 16 13:31 /tmp/pear/temp/pear-build-rootdfXhAS/install-memcache-3.0.8/usr/lib
421806 4 drwxr-xr-x 3 root root 4096 Aug 16 13:31 /tmp/pear/temp/pear-build-rootdfXhAS/install-memcache-3.0.8/usr/lib/php5
421807 4 drwxr-xr-x 2 root root 4096 Aug 16 13:31 /tmp/pear/temp/pear-build-rootdfXhAS/install-memcache-3.0.8/usr/lib/php5/20090626+lfs
421803 364 -rwxr-xr-x 1 root root 372210 Aug 16 13:31 /tmp/pear/temp/pear-build-rootdfXhAS/install-memcache-3.0.8/usr/lib/php5/20090626+lfs/memcache.so
Build process completed successfully
Installing '/usr/lib/php5/20090626+lfs/memcache.so'
install ok: channel://pecl.php.net/memcache-3.0.8
configuration option "php_ini" is not set to php.ini location
You should add "extension=memcache.so" to php.ini
The only thing left to do is restart Apache web server:
sudo service apache2 restart