See Http://code.google.com/p/memcached/wiki/PHPClientComparison for comparison. It is recommended to use the new memcached, the installation method is basically the same as below, just need to install libmemcached first, if you need to enable compression, you also need to install zlib.
Compiling a shared PECL extension library with PECL
$ pecl Install Extname
Then is a long list of automatic execution, and finally the program tells you that you should add "extension=memcache.so" to php.ini, of course, but also to put the newly generated memcache.so into your PHP extension library directory.
In the official website of the manual is to use the pear to install the extension, but to the actual operation will appear error, said can not find memcache, let me use pecl install ...
Compiling a shared PECL extension library with Phpize
The above method is to be downloaded. You can also do it yourself, and then install it with phpize.
First down, then unzip, then go into the directory, execute:
$ phpize
$./configure
$ make
# make Install
Then put the memcache.so in your PHP extensions directory and php.ini Riga extension=memcache.so.
The last extreme way to extend static compilation, why is it such a laborious method? The legend is that it will be more efficient than. So, I have not compared ...
You can go to the next package, then unzip, put in the PHPSRC directory to be installed under the EXT directory, and then:
$ RM Configure
$./buildconf--force
$./configure--help
$./configure--with-memcache
$ make
$ make Install
A bit messy, there are better articles:
Memcached:
http://willko.javaeye.com/blog/332993
http://cn2.php.net/manual/en/book.memcached.php
http://cn.php.net/manual/en/book.memcache.php
Pecl
http://cn2.php.net/manual/en/install.pecl.php
Memcache can study a lot of things, such as the partial hash strategy, as a session strategy, persistent memcache and so on. Have a chance to Hu Yu again.
--eof--
The above describes the memcached php memcache extension of the three installation methods, including the memcached aspect of the content, I hope that the PHP tutorial interested in a friend helpful.