Windows上的PHP7 Memcache?

Jen*_*irk 25 windows memcached php-7

有没有人知道在Windows上支持PHP7的Memcache版本?

Memcache非常适合PHP 5.6(在Windows上),但我找不到PHP7的版本.

non*_*303 37

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

  • vc14&vc15
  • x86x64
  • ts&nts


小智 5

  1. 首先,检查phpinfo(),例如:
    • 编译器:MSVC14 (Visual C ++ 2015)
    • 架构:x64
    • PHP扩展版本:API20160303,NTSVC14
  2. 基于phpinfo()中的信息;选择正确的dll:
  3. 复制到php_memcache.dll到\ PHP \ v7.1 \ ext
  4. 在php.ini中启用php_memcache,添加以下行:
    • 扩展名= php_memcache.dll
  5. 检查phpinfo()中“ memcache”部分的显示;
  6. 检查errors.log


Wil*_*ill 2

memcached扩展无法在 Windows 上运行,因为它libmemcached无法在 Windows 上运行。然而,有人似乎已经memcache在 Windows 上安装了旧的扩展。我找不到一个好的预编译二进制文件,但是,经过大量挖掘,我发现了关于此问题的PHP 错误报告。那里的人似乎找到了解决方案:

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

git 存储库https://github.com/websupport-sk/pecl-memcache.git的分支“NON_BLOCKING_IO_php7”在 win32 x86 线程安全模式下针对 php 7.0.2 构建良好。我还没有使用非线程安全和/或 x64 对其进行测试。

为了构建 php_memcache.dll,我按照https://wiki.php.net/internals/windows/stepbystepbuild#building_pecl_extensions上的说明使用:

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
Run Code Online (Sandbox Code Playgroud)