Can we implement memcache without php_memcached.dl

2019-09-09 17:06发布

问题:

I want to implement memcache into my Zendframework 2 application.

For that, is it possible to implement only with Zend framework 2 library without php_memcache.dll and php_memcached.dll?

If not, How can I install php_memcached.dll. I have searched with google for php_memcached.dll they have given some daemon, kindly help me how to proceed with that daemon.

I have referred this links:

Does memcached.dll exist?

http://www.couchbase.com/forums/thread/libmemcacheddll-32-bit-and-64-bit-php-extensions

Thanks.

回答1:

It isn't only possible to implement with Zend framewotk you can use it stand-alone with PHP

Read this for more enlightment (memcache vs memcached):

When should I use Memcache instead of Memcached?

Now choose from memcache or memcached libs, Personally I would go to memcached, but since you are on windows I think your only choice is memcache.

So download this zip:

http://windows.php.net/downloads/pecl/releases/memcache/3.0.8/php_memcache-3.0.8-5.4-ts-vc9-x86.zip

Unzip it, put php_memcache.dll in your extensions dir, if you are using XAMPP the path would be something like C:\xampp\php\extensions\

Edit your php.ini

and include a line

extensions = php_memcache.dll

Restart the Apache, and boom you have memcache installed.

See this documentation on how to use memcache

http://www.php.net/manual/en/class.memcache.php