繁体   English   中英

如何在XAMPP mac osx lion中设置memcache

[英]How to setup memcache, in XAMPP mac osx lion

如何在XAMPP,Mac OSX Lion中设置memcache。 在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位模式构建)

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

...
    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扩展,而是通过添加使用32位架构标志配置构建脚本的行来修改PEAR安装程序
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 memcache扩展工作! 祝你今天愉快! :)

首先安装Xampp开发人员工具。 然后

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

也不是需要apache服务器重启。

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM