Memcached

71 views
Skip to first unread message

Matty

unread,
Apr 10, 2016, 7:15:43 PM4/10/16
to OpenLiteSpeed Development
Is seems that when compiling PHP the option to also compile memcache is no longer showing as an option.

How do I make memcache work with php without this?

Jackson Zhang

unread,
Apr 19, 2016, 10:00:09 AM4/19/16
to OpenLiteSpeed Development
Hello Matty:
PHP Memcache extension doesn't support PHP 7 yet. For other PHP 5.x version,  you can install lsphp5x-pecl-memcached extention from LiteSpeed Repository or follow this wiki to install:

Best Regards
Jackson
LiteSpeed

Matty

unread,
May 24, 2016, 5:43:14 AM5/24/16
to OpenLiteSpeed Development
Hi, Are you able to add it to the Debian reoisutirys, mainly wheezy. I've looked and I'm unable to find it in there. I've tried to compile it from source like the wiki you linked to but again it seems to be for centos.

Kevin Fwu

unread,
May 24, 2016, 2:21:06 PM5/24/16
to OpenLiteSpeed Development
Hi Matty,

Unfortunately, we do not have it in the Debian repositories. That said, compiling from source should work. I can see how you got confused by this, and for that we apologize.

These steps are assuming you want to use PHP 5.5. If you want to use 5.6, just replace '55' with '56'

wget a package from here: https://pecl.php.net/package/memcache (this assumes that this is the correct package, there's a 'memcache' and there is a 'memcached'. This is for memcache.)
decompress the tar and cd into it.
/usr/local/lsws/lsphp55/bin/phpize
./configure --enable-memcache --with-php-config=/usr/local/lsws/lsphp55/bin/php-config 
make 
make install

Once installed, you need to add a line to your php.ini file in the Extensions section:
extension=/path/to/memcache.so

As an example, mine was installed to /usr/local/lsws/lsphp56/lib/php/20131226/memcache.so

Once added, just restart the server and check the php info page to confirm that it was added.

NOTE: The configure step may fail if you do not have the dev lsphp package. It will say something regarding missing a php_sessions.h file.
apt-get update
apt-get install lsphp55-dev

Please let me know if you run into any problems,
Kevin
Reply all
Reply to author
Forward
0 new messages