Php – How to i install memcache for PHP 5.2.10 in CentOS 5.5? (not in repo)

memcachememcachedPHP

i tried installing memcache from another repo and it all went wrong:

[root@mail ~]# php -v
PHP Warning:  PHP Startup: memcache: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP    compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
 in Unknown on line 0
PHP 5.2.10 (cli) (built: Nov 13 2009 11:44:05) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

How can i completely uninstall memcached and memcache and then install it to be compatible with PHP 5.2.10?

Thanks!

Best Answer

You should install it with pecl:

sudo pecl install memcache

This will compile the extension on your environment.

Related Topic