HOW TO: Install Memcache on XAMPP (Windows 7/8/10)

Here are the steps that should be followed when you install memcache. Start your xampp. Click on ‘config’ and open php.ini file. search for ;extension=php_memcache.dll If not found add extension=php_memcache.dll [Memcache] memcache.allow_failover = 1 memcache.max_failover_attempts=20 memcache.chunk_size =8192 memcache.default_port = 11211 Download the file php_memcache.dll from windows.php.net (make sure to check your php version and php_memcache.dll … Read more

Apache is “Unable to initialize module” because of module’s and PHP’s API don’t match after changing the PHP configuration

When you update the version of PHP (especially when going from version X.Y to version X.Z), you must update the PHP extensions as well. This is because PHP extensions are developped in C, and are “close” to the internals of PHP — which means that, if the APIs of those internals change, the extension must … Read more

Does memcached.dll exist?

It does not exist and is very unlikely to exist any time soon. The main problem is not the extension itself but the libmemcached library. This library is barely portable to anything but a linux system, so windows support won’t happen anytime soon (using Visual C).

get all keys set in memcached

Found a way, thanks to the link here (with the original google group discussion here) First, Telnet to your server: telnet 127.0.0.1 11211 Next, list the items to get the slab ids: stats items STAT items:3:number 1 STAT items:3:age 498 STAT items:22:number 1 STAT items:22:age 498 END The first number after ‘items’ is the slab … Read more

configure: error: C compiler cannot create executables

I have 10.8 installed and Xcode 4.4 with Command Line tools, and yet I was still getting this error. Rather than reinstall Xcode, I noticed there were two relevant lines in my config.log: configure:5130: checking for C compiler version configure:5139: /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc –version >&5 That path did not exist for me. Instead I had: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain The … Read more

Is the ruby operator ||= intelligent?

This is extremely easy to test: class MyCache def initialize @hash = {} end def []=(key, value) puts “Cache key ‘#{key}’ written” @hash[key] = value end def [](key) puts “Cache key ‘#{key}’ read” @hash[key] end end Now simply try the ||= syntax: cache = MyCache.new cache[“my key”] ||= “my value” # cache value was nil … Read more