Linux system nginx php-fpm install PHP memcache extension

Source: Internet
Author: User
Tags fpm install php zend

Here's a look at a Linux system nginx php-fpm install PHP memcache Extension Tutorial, there are many ways to install memcache plug-ins but if you use PHP-FPM and Nginx driver php to use those sudo apt-get Install Php5-memcache may not be used.
Tell me how to configure the Memcache PHP call if you manually install PHP in a special directory.

Context reference I wrote php-fpm install that blog.

The code is as follows Copy Code

Cd/data1/server/php-cgi/bin

Go to PHP installed directory bin to execute

  code is as follows copy code

./pecl Install memcache
Downloading memcache-2.2.6.tgz ...
Starting to download memcache-2.2.6.tgz (35,957 bytes)
... done:35,957 bytes
One source files, building
W Arning:php_bin/data1/server/php-cgi/bin/php appears to have a suffix-cgi/bin/php but config variable php_suffix does n OT match
Running:phpize
Configuring for:
PHP API version:20100412
Zend Module Api no:20100525
Zend Extension Api no:220100525
Cannot find autoconf. Please check your autoconf installation and the
$PHP _autoconf environment variable. Then, rerun this script.

ERROR: ' phpize ' failed

There's nothing to wear. Start loading him.
sudo apt-get install autoconf

showed a success.

Build process completed successfully
Installing '/data1/server/php-cgi/lib/php/extensions/no-debug-non-zts-20100525/memcache.so '
Install ok:channel://pecl.php.net/memcache-2.2.6
Configuration option ' Php_ini ' is ' not ' set to php.ini location
Should add "extension=memcache.so" to PHP.ini

Installation prompts to extension=memcache.so this sentence to join the php.ini was successful.
Test

The code is as follows Copy Code

<?php
$mem = new Memcache;
$mem->connect (' 211.144.xx.xx ', 11211);
$mem->set (' key ', ' This is a test! ', 0, 60);
$val = $mem->get (' key ');
Echo $val;
?>

was not successful.

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.