Problems installing pecl memcache

Uwe Mesecke uwe at
Tue May 22 19:53:03 UTC 2007

Am Dienstag, 22. Mai 2007 schrieb Ahto ´:
> Hi,
> I tried to install the latest memcache pecl extension but it failed to
> configure because it could not find the php_session.h file so I made the
> necessary symlink. I tried to configure it again but it failed with the
> following error:
> checking for session includes... /usr/include/phpchecking for memcache
> session support... enabledconfigure: error:You've configured extension
> memcache, which depends on extension session,but you've either not enabled
> session, or have disabled it.
> I don't know what to do next because session extension is installed and
> working just fine. My system is ubuntu and Php version 5.1.2 was installed
> through apt-get.
> Did anyone run into the same problem?

ubuntu uses different include paths for php4 and php5 so you have to patch the 
file config9.m4 that comes with the tarball. The following patch made me able 
to compile the extension. Not pretty but it works.

diff -ruN orig/memcache-2.1.2/config9.m4 new/memcache-2.1.2/config9.m4
--- orig/memcache-2.1.2/config9.m4      2007-03-27 01:17:50.000000000 +0200
+++ new/memcache-2.1.2/config9.m4       2007-04-23 13:25:39.000000000 +0200
@@ -65,12 +65,12 @@

   if test "$PHP_MEMCACHE_SESSION" != "no"; then
        AC_MSG_CHECKING([for session includes])
-    if test -f $abs_srcdir/include/php/ext/session/php_session.h; then
-      session_inc_path=$abs_srcdir/include/php
+    if test -f $abs_srcdir/include/php5/ext/session/php_session.h; then
+      session_inc_path=$abs_srcdir/include/php5
     elif test -f $abs_srcdir/ext/session/php_session.h; then
-    elif test -f $prefix/include/php/ext/session/php_session.h; then
-      session_inc_path=$prefix/include/php
+    elif test -f $prefix/include/php5/ext/session/php_session.h; then
+      session_inc_path=$prefix/include/php5


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url :

More information about the memcached mailing list