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.