How to compile and install the php 4 memcached extension

Posted by andu
Tue, 2007-04-24 12:00

Here's a short guide on installing the php 4 memcached extension from source. I write it as a reference as I couldn't find some precise instructions on this.

Download and extract the source code:

system:~# wget http://pecl.php.net/get/memcache-2.1.2.tgz
system:~# tar xvfz memcache-2.1.2.tgz

Prepare the extension for compiling:

system:~# cd memcache-2.1.2
system:~/memcache-2.1.2# phpize

Configure, make and make install:

system:~/memcache-2.1.2# ./configure
system:~/memcache-2.1.2# make
system:~/memcache-2.1.2# make install

If configure fails with the following error: configure: error: Cannot find php_session.h (as it did on ubuntu and debian for me) then you'll have to create a symbolic link to /usr/include/php4 called /usr/include/php. If you don't have one of those directories, then you're probably missing the php4-dev package.

Trackback URL for this post:

http://voidberg.org/trackback/215

To improve the PHP performance, I started playing with APC (Alternative PHP Cache) and memcached recently. However, to install the APC extension and PHP-Memcache client on Debian Sarge turned out to be not that trivial. Here I’d like to share my ...

如果你使用 Debian Linux Sarge 3.1的话,可以使用下面的步骤来安装 APC (PHP缓冲加速器) 和 PHP-Memcache 模块(PHP客户端,支持memcached分散式内存缓冲)
首先你需要安装 PHP4的 开发包 和 pear:

apt-get install...

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]".

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.