Saturday, 15 April 2017

apache - How to check if memcache or memcached is installed for PHP?



How do I test if memcache or memcached (for PHP) is installed on my Apache webserver?





Memcache is a caching daemon designed especially for
dynamic web applications to decrease database load by
storing objects in memory.



Answer



You can look at phpinfo() or check if any of the functions of memcache is available. Ultimately, check whether the Memcache class exists or not.



e.g.




if(class_exists('Memcache')){
// Memcache is enabled.
}

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...