Reputation: 17825
I installed the memcached extension service .
Started it using
memcached.exe -d start
command and it works fine.
Now I added the php_memcache.dll file in
php/php5.5.12/ext
folder and included the
extension=php_memcache.dll
in php.ini(Apache's php.ini) file
php_memcache does show up in the php extensions.
Now when I run the below code , it throws a notice saying
undefined variable isMemcacheAvailable
. So does that mean still memcache is not properly installed ?
if (class_exists('Memcache')) {
$memcache = new Memcache;
$isMemcacheAvailable = @$memcache->connect('127.0.0.1');
}
if ($isMemcacheAvailable) {
echo "yes";
}
Upvotes: 1
Views: 2001
Reputation: 306
There are two memcache extensions memcache and memcached.
It looks like you have installed memcached but you need memcache (i.e. php_memcache.dll)
Download Link: https://pecl.php.net/package/memcache/3.0.8/windows
Edit: Sorry I misread your post above and read that you had installed php_memcached.dll however you do actually say you've installed what I've suggested, are you sure the correct DLL has been added?
Upvotes: 2