【问题标题】:How to setup memcache, in XAMPP mac osx lion如何在 XAMPP mac osx lion 中设置 memcache
【发布时间】:2012-04-02 09:42:31
【问题描述】:

如何在 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 试过这个,但没有结果!!

任何人都可以建议做什么。

【问题讨论】:

    标签: php macos memcached osx-lion xampp


    【解决方案1】:

    这对我使用 Mac OS X Mountain Lion 有帮助,XAMPP 1.7.3(“pecl install”的标准方式不起作用,因为它编译 64 位 XAMPP 在 32 位 模式下构建时的扩展)

    (首先表明你没有安装这个如果你收到这种警告

    ... grep:/Applications/XAMPP/xamppfiles/include/php/php-5.3.1/php/main/php.h:没有这样的文件或目录 grep:/Applications/XAMPP/xamppfiles/include/php/php-5.3.1/php/Zend/zend_modules.h:没有这样的文件或目录 ...

    )

    • 我没有手动构建 memcache 扩展,而是修改了 PEAR 安装程序,添加了配置带有 32 位 架构标志的构建脚本的行:
    文件:/Applications/XAMPP/xamppfiles/lib/php/pear/PEAR/Builder.php 曾是: 第 323 行:// {{{ 交互部分的开始 第 324 行:$configure_command = "$dir/configure"; 第 325 行:$configure_options = $pkg->getConfigureOptions(); 修改后: 第 323 行:// {{{ 交互部分的开始 第 324 行:$configure_command = "$dir/configure"; 第 325 行:$configure_command .= "CFLAGS='-arch i386' APXSLDFLAGS='-arch i386'"; 第 326 行:$configure_options = $pkg->getConfigureOptions();
    • 然后我从终端执行了这个:
    cd /Applications/XAMPP/xamppfiles/bin sudo ./pecl 安装内存缓存
    • 重新启动 Apache 服务器

    瞧!我有 php memcache 扩展工作!祝你今天过得愉快! :)

    【讨论】:

    • 我必须同意雅各布的观点。我只是漫无目的地花了 2 个小时试图完成这项工作,并最终通过这篇文章弄清楚了。对于那些使用 XAMPP 的人来说,这就是解决方案……没有其他方法了。
    【解决方案2】:

    首先安装 Xampp 开发者工具。那么

    sudo /Applications/XAMPP/xamppfiles/bin/pecl install memcache
    

    也不需要重启 apache 服务器。

    或者您可以查看此以获得完整指南。 http://wiki.cerb5.com/wiki/Setup:Development/XAMPP/Mac_OS_X

    【讨论】:

      猜你喜欢
      • 2012-03-31
      • 2013-09-27
      • 2012-02-23
      • 1970-01-01
      • 2015-05-27
      • 2012-08-08
      • 1970-01-01
      • 2012-06-05
      • 2012-01-22
      相关资源
      最近更新 更多