Enabling PHP's memcache extension

majglow

Verified User
Joined
Feb 2, 2005
Messages
11
Location
Oregon
Ok, I have memcache running on a server and now i'm trying to get php's memcache features to work. I realize that i have to recompile PHP. So I did the following:

Edit configure.php I now have the following:
Code:
#!/bin/sh
./configure \
        --with-apxs \
        --with-curl \
        --with-curl-dir=/usr/local/lib \
        --with-gd \
        --with-gd-dir=/usr/local/lib \
        --with-gettext \
        --with-jpeg-dir=/usr/local/lib \
        --with-kerberos \
        --with-mcrypt \
        --with-mhash \
        --with-mysql=/usr/local/mysql \
        --with-pear \
        --with-png-dir=/usr/local/lib \
        --with-xml \
        --with-zlib \
        --with-zlib-dir=/usr/local/lib \
        --with-zip \
        --with-openssl \
        --enable-bcmath \
        --enable-calendar \
        --enable-ftp \
        --enable-magic-quotes \
        --enable-sockets \
        --enable-memcache \
        --enable-track-vars

I then did the following:

./build clean
./build php n

I reloaded apache and it doesn't seem to work. Here is a phpinfo page on the server:

http://www.conqueredthe.us/gohuman/phpinfo.php

If I try to use memcache functions I get the following error:

Fatal error: Call to undefined function: memcache_connect() ... etc...

Any ideas why it didn't work. The phpinfo page shows that i'm using a build of php with memcache enabled.
 
Ok, I have memcache running on a server and now i'm trying to get php's memcache features to work. I realize that i have to recompile PHP. So I did the following:

Edit configure.php I now have the following:
Code:
#!/bin/sh
./configure \
... stuff removed ...
        --enable-memcache \

Funny enough I suffer the same problem. I have used memcached in the past and used it with a couple of web servers but now I simply cannot make the extension visible. PhpInfo() shows the correct configuration but the extension is not on the list. I have compiled and installed the memcached daemon and it is running beautifully.

Anybody succeeded in adding memcache support to PHP5 using DA?

Markku
 
Back
Top