Using CMemCache if installed on server

Hi

Is it possible to use cMemCache but if memcache is not installed on the server, not show any errors to the user?

Many thanks

There must be a way of checking to see if memcached is installed/running on the server before it is used?

Or am I just being overly optimistic?

you can check if the PHP extension for it is loaded/installed… something like it’s done on the Yii requirements page:


if(extension_loaded("memcache") || extension_loaded("memcached"))

Hi mdomba,

Thanks for your reply, that’s exactly what I did in the end. I guess I have been spoilt by Yii knowing exactly what I was thinking and having an incredible clean and easy solution to everything I have come across that is even a little annoying.

Thanks again, all the best.

Yogi