Install Memcached on Ubuntu XAMPP

Source: Internet
Author: User
Tags zts
XAMPP is a convenient Apache + PHP + MySQL + FTP development kit that saves you the trouble of installing a large number of configurations. Sometimes developers need to install the memcached module. It is very convenient to install the memcached module in UbuntuLinux, but the installation in XAMPP may encounter some problems. With the help of tutorials and colleagues on the network, I found out the following installation methods: 1. Install memcached and php extension sudoapt-getinstallmemcachedphp

XAMPP is a convenient Apache + PHP + MySQL + FTP development kit that saves you the trouble of installing a large number of configurations. Sometimes developers need to install the memcached module. It is very convenient to install the memcached module in Ubuntu Linux, but the installation in XAMPP may encounter some problems. With the help of tutorials and colleagues on the network, I found out the following installation method:

1. Install memcached and php extensions

Sudo apt-get install memcached php-pecl-memcache

2. Start memcached (run this command every time you start the system)

Memcached-d-m 1024-u root-l 127.0.0.1-p 11211

3. Modify the php configuration file of XAMPP:

Sudo gedit/opt/lampp/etc/php. ini

Add a line at the end:

"Extension = memcache. so"

4. Restart XAMPP and a path error will be prompted. Generally, memcache. so is not found in this directory:
/Opt/lampp/lib/php/extensions/no-debug-non-zts-20060613/

Now we only need to copy memcache. so in the system to the required folder:

Sudo cp/usr/lib/php5/20060613 + lfs/memcache. so/opt/lampp/lib/php/extensions/no-debug-non-zts-20060613/

Maybe your memcache. so file is not in the directory above. You can search for the path:

Sudo updatedb
Locate memcache. so

Note: memcached will be attached to Apache pre-installed on ubuntu and run as server deamon, which may conflict with Apache of XAMPP. In this case, it is best to uninstall the native Apache in the system:

Sudo apt-get remove apache2.2-common
Sudo apt-get autoremove

OK. Now you can test whether your memcached runs properly:

$ Memcache = new Memcache;
?>

It should be okay if no error is reported ~

 

This article comes from:Http://oncoding.cn/blog/html/y2009/ubuntu-xampp-memcached.html

Linux community (Linuxidc) statement: the Linux community published this article for the purpose of transmitting more information, does not mean to agree with its views or confirm its description.

Related Article

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.