php - 为 PHP 5.4 构建/获取 php_memcache.dll 的最简单方法

标签 php windows dll build

我计划在需要 Memcache 和 php_memcache.dll 的应用程序上使用 PHP 5.4 中可用的 Traits

我正在使用 PHP 5.4 最新候选版本的 Windows 机器上进行开发。

我无法获取 php_memcache.dll 的 PHP 5.4 版本,因此想知道如何获取它或失败,自己构建它(http://www.php.net/manual/en/install.windows.building.php 上的说明似乎有点缺乏!)。

我的机器上没有安装 Visual Studio 或任何构建工具(理想情况下我不想为此付费)。

谢谢

最佳答案

PECL/memcache 3.0.5 和 3.0.6 似乎不能在 Windows 下正确编译(至少不能按照 PHP's Wiki 中提供的说明编译)。版本2.2.6似乎编译正确。

按照 Wiki 中的说明使用此配置字符串:

--enable-cli-win32 --disable-zts --disable-isapi --disable-nsapi --without-mssql --without-pdo-mssql --without-pi3web --disable-static-analyze --enable-memcache=shared

这应该会为您提供与 PHP 5.4.0(VC9,非线程安全)兼容的“php_memcache.dll”。这些选项(有一些小的修改)取自 PHP.net 上提供的 Win32 二进制文件的构建配置。

扩展在 PHP 5.4.0RC6 中加载时没有错误,但我实际上没有以任何有意义的方式(压力-)测试它......

关于php - 为 PHP 5.4 构建/获取 php_memcache.dll 的最简单方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8966532/

相关文章:

Python ctypes 参数错误

.net - `Exporting a function from a DLL` 是什么意思?

javascript - 我正在尝试让 jquery 插件在我的 wordpress 网站上工作

php - json_encode() 的多个标志

windows - Windows 键盘键的 ascii 代码和功能键(F1 - F12)和其他键(如 shift、capslock、backspace、ctrl 等)的代码

python - ipython 无法在 Windows 上运行

java - 当我在 CMD 中运行 "check_jmxeval.bat"来测试设置时出现异常缺少类

python - 在 Python 中使用 .NET dll

javascript - 更改生成的图表的尺寸

php - 如何访问具有相同名称的不同表的多个mysql行