How to setup memcache, in XAMPP mac osx lion

This is what helped me with Mac OS X Mountain Lion, XAMPP 1.7.3 (Standard way with "pecl install" doesn't work because it compiles 64 bit extension while XAMPP is build in 32 bit mode)

(First sign you don't have this installed If you get this kind of warnings 

    ...
    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
    ...

)

  • Instead of manually building memcache extension I've modified PEAR installer by adding line that configures build script with 32 bit architecture flags:
    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();

  • Then from terminal I executed this:
    cd /Applications/XAMPP/xamppfiles/bin
    sudo ./pecl install memcache

  • Restarted Apache server

And voila! I have php memcache extension working! Have a nice day! :)



First install Xampp developer tools. Then

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

Also not that apache server restart is needed.

Or you can check this for full guide.http://wiki.cerb5.com/wiki/Setup:Development/XAMPP/Mac_OS_X


转载:http://stackoverflow.com/questions/9744185/how-to-setup-memcache-in-xampp-mac-osx-lion

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值