Home >Backend Development >PHP Problem >Where is the memcached php extension installation directory?
# Recommended: "The memcached php extension installation directory is under the path "/lib/php/extensions". The installation method is: first install the libmemcached library; then install the memcached extension through the wget command; and finally modify the php.ini file.
PHP Video Tutorial》
There are two extensions in php for operating memcached. The document address is as follows: http://php.net/manual/zh/book.memcache.phphttp ://php.net/manual/zh/book.memcached.php
It is generally recommended to use memcached to operate memcached.
wget https://pecl.php.net/get/memcache-3.0.8.tgztar zxvf memcache-3.0.8.tgz cd memcache-3.0.8/usr/local/webserver/php/bin/phpize./configure --with-php-config=/usr/local/webserver/php/bin/php-config make && make installIf nothing unexpected happens, there will be the following prompt message after the execution is completed:
Installing shared extensions: /usr/local/webserver/php/lib/php/extensions/no-debug-non-zts-20100525/After that, we only need to Just add the following content to the php.ini file:
extension=memcache.soAfter restarting the server, you can see the memcache extension information in phpinfo():
wget https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gztar zxvf libmemcached-1.0.18.tar.gzcd libmemcached-1.0.18./configure make && make installThen execute the following command to install the memcached extension:
wget https://pecl.php.net/get/memcached-2.2.0.tgzcd memcached-2.2.0.tgz tar zxvf memcached-2.2.0.tgz cd memcached-2.2.0/usr/local/webserver/php/bin/phpize./configure --with-php-config=/usr/local/webserver/php/bin/php-configmake && make installAfter the execution is completed, you can see the following information:
Installing shared extensions: /usr/local/webserver/php/lib/php/extensions/no-debug-non-zts-20100525/After that, we only need to add the following content to the php.ini file:
extension=memcached.soAfter restarting the server, you can I saw memcached extended information in phpinfo():
The above is the detailed content of Where is the memcached php extension installation directory?. For more information, please follow other related articles on the PHP Chinese website!