Home > Backend Development > PHP Problem > Where is the memcached php extension installation directory?

Where is the memcached php extension installation directory?

藏色散人
Release: 2023-03-07 11:52:02
Original
2493 people have browsed it

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.

Where is the memcached php extension installation directory?

# Recommended: "

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.php

http ://php.net/manual/zh/book.memcached.php
It is generally recommended to use memcached to operate memcached.

First install memcache and follow the steps below:

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 install
Copy after login

If 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/
Copy after login
Copy after login

After that, we only need to Just add the following content to the php.ini file:

extension=memcache.so
Copy after login

After restarting the server, you can see the memcache extension information in phpinfo():


Where is the memcached php extension installation directory?

Connect Next, install the memcached extension. The difference from the installation of the memcache extension is that the memcached extension depends on the libmemcached library. First execute the following command to install the libmemcached library:

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 install
Copy after login

Then 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 install
Copy after login

After 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/
Copy after login
Copy after login

After that, we only need to add the following content to the php.ini file:

extension=memcached.so
Copy after login

After restarting the server, you can I saw memcached extended information in phpinfo():


Where is the memcached php extension installation directory?

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template