如何在 XAMPP、Mac OSX Lion 中设置内存缓存。这在 Leopard 中非常简单(使用此链接 http://m-schmidt.eu/2010/03/30/develop-memcached-web-apps-with-xampp-under-mac-os-x/ ),但我安装了新的 Lion,似乎没有安装 memcache。
我在 https://gist.github.com/1301997 中试过这个但没有结果!!
任何人都可以建议做什么。
最佳答案
这就是帮助我使用 Mac OS X Mountain Lion、XAMPP 1.7.3 的原因(“pecl install”的标准方式不起作用,因为它编译64 位扩展,而 XAMPP 是在 32 位 模式下构建的)
- 我有 memcached 服务器和 Xcode
- 我从 http://www.apachefriends.org/en/xampp-macosx.html 下载并安装了 XAMPP 开发包
(首先表明你没有安装这个如果你收到这种警告
... grep: /Applications/XAMPP/xamppfiles/include/php/php-5.3.1/php/main/php.h: No such file or directory grep: /Applications/XAMPP/xamppfiles/include/php/php-5.3.1/php/Zend/zend_modules.h: No such file or directory ...
)
- 我没有手动构建memcache 扩展,而是修改了PEAR 安装程序,添加了使用32 位 架构标志配置构建脚本的行:
File: /Applications/XAMPP/xamppfiles/lib/php/pear/PEAR/Builder.php Was: Line 323: // {{{ start of interactive part Line 324: $configure_command = "$dir/configure"; Line 325: $configure_options = $pkg->getConfigureOptions(); After modification: Line 323: // {{{ start of interactive part Line 324: $configure_command = "$dir/configure"; Line 325: $configure_command .= " CFLAGS='-arch i386' APXSLDFLAGS='-arch i386' "; Line 326: $configure_options = $pkg->getConfigureOptions();
- 然后我从终端执行了这个:
cd /Applications/XAMPP/xamppfiles/bin sudo ./pecl install memcache
- 重新启动 Apache 服务器
瞧!我有 php 内存缓存扩展工作!祝你今天过得愉快! :)
关于php - 如何在 XAMPP mac osx lion 中设置内存缓存,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9744185/