PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, November 12, 2022

[FIXED] How to use memcached with Joomla

 November 12, 2022     joomla, memcached, mysql, php     No comments   

Issue

How can I use memcache in Joomla? I'm a newbie in this field so please be descriptive with your answer.


Solution

You will need to install memcached on your server and will probably need root access to do so. You can get memcached from http://www.danga.com/memcached/. It requires libevent, which can be downloaded here: http://www.monkey.org/~provos/libevent/

Finally, you'll need to get the PHP PECL extension for memcache. To install this, you need to go to the server where PHP is installed and run this command:

pecl install memcache

Again, you will most likely need root access to your server to do this. After you have libevent, memcached, and the PECL extensions installed, go to the Global Configuration in Joomla and choose Memory Cache as the Cache Handler under Cache Settings. After you save the Global Configuration, open it again and more inputs should appear underneath the Cache Handler input. Set Memory Chache Server to localhost and the port to 11211. This should match the parameters you use to run memcached from the command line.

EDIT: You can also use XCache not only to store data in a way similar to Memcache, but it will also cache the opcode generated by PHP. This way, instead of reading the PHP code from disk and parsing it each time, it will hold the code in memory for the next request.

Be sure to select XCache as the Cache Handler in Global Configuration. Read this for information on installing XCache: http://xcache.lighttpd.net/wiki/InstallFromSource



Answered By - jlleblanc
Answer Checked By - Cary Denson (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing