Memcached-install the memcache extension of php in linux

Source: Internet
Author: User
The memcached extension of php is installed in linux, and no error message is reported. The php. ini file has been modified. After nginx is restarted, it is found that the memcached module extensions are not displayed in phpinfo. This is also the way other php extensions are installed. No error is reported but the extensions are not loaded. The memcached extension of php is installed in linux, and no error message is reported. The php. ini file has been modified. After nginx is restarted, it is found that the memcached module extensions are not displayed in phpinfo.
This is also the way other php extensions are installed. No error is reported but the extensions are not loaded.

Reply content:

The memcached extension of php is installed in linux, and no error message is reported. The php. ini file has been modified. After nginx is restarted, it is found that the memcached module extensions are not displayed in phpinfo.
This is also the way other php extensions are installed. No error is reported but the extensions are not loaded.

If it is Ubuntu/Debian, you can use apt to install it like this:

sudo apt-get install php5-memcached

If your PHP is compiled and installed, You can compile the php5-memcached like this:
Https://pecl.php.net/package/memcached

Cd memcached-2.2.0/png/php/5.4/bin/phpize generate configure./configure -- with-php-config =/png/php/5.4/bin/php-configmake & make install

Then add the following to php. ini:

extension=memcached.so

Restart Apache or the PHP-FPM service to take effect.

pecl install memcached

The problem has been solved. I put the php. ini file in the wrong location. Thank you.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.