Jens Kirk
Jens Kirk

Reputation: 536

Memcache for PHP7 on Windows?

Does any one know about a Memcache version that supports PHP7 on Windows?

Memcache is working great for PHP 5.6 (on Windows), but I cannot find the version for PHP7.

Upvotes: 26

Views: 31810

Answers (5)

nono303
nono303

Reputation: 371

Please find php_memcache.dll for php7.0.x, php7.1.x, php7.2.x https://github.com/nono303/PHP7-memcache-dll

  • vc14 & vc15
  • x86 & x64
  • ts & nts

Upvotes: 37

Matej Kolesár
Matej Kolesár

Reputation: 81

  1. At first, check phpinfo(), example:
    • Compiler: MSVC14 (Visual C++ 2015)
    • Architecture: x64
    • PHP Extension Build: API20160303,NTS,VC14
  2. Based on information in phpinfo(); choose right dll:
  3. Copy to php_memcache.dll to \PHP\v7.1\ext
  4. Enable php_memcache in php.ini, add line:
    • extension=php_memcache.dll
  5. Check presentation of 'memcache' section in phpinfo();
  6. Check errors.log

Upvotes: 8

Juris Vaiders
Juris Vaiders

Reputation: 635

Just in case if anyone needs dll files - https://github.com/jur4x/PHP7-memcahe-dll. Compiled for PHP 7.0.6, both thread safe and non thread safe versions.

Upvotes: 4

supersan
supersan

Reputation: 6181

Here is the dll you can use with your PHP7 Windows installation (64 bit)

https://github.com/Alvine-IO/php7-windows/blob/master/x64/ts/dll/php_memcache.dll

Upvotes: 4

Will
Will

Reputation: 24729

The new memcached extension doesn't work on Windows because libmemcached doesn't work on Windows. However, someone seems to have gotten the old memcache extension to install on Windows. I can't find a nice pre-compiled binary, but, after a lot of digging, I found a PHP Bug Report about this issue. Someone there seems to have found a solution:

[2016-01-20 23:11 UTC] php at alternize dot com

the branch "NON_BLOCKING_IO_php7" of the git repository https://github.com/websupport-sk/pecl-memcache.git builds fine against php 7.0.2 in win32 x86 thread-safe mode. i have not tested it with non-thread-safe and/or x64.

to build the php_memcache.dll, i followed the instructions on https://wiki.php.net/internals/windows/stepbystepbuild#building_pecl_extensions using:

C:\php-sdk\phpdev\vc14\x86\php-7.0.2-src>buildconf
C:\php-sdk\phpdev\vc14\x86\php-7.0.2-src>configure --disable-all 
  --enable-cli --enable-zlib --enable-hash --enable-session 
  --without-gd --with-bz2 --enable-memcache=shared
C:\php-sdk\phpdev\vc14\x86\php-7.0.2-src>nmake

Upvotes: 2

Related Questions