您的位置:首页 > 数据库 > Memcache

How to setup memcache, in XAMPP mac osx lion

2015-03-27 17:57 337 查看
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)

I've got memcached server with Xcode
I downloaded and installed XAMPP Developer Package from http://www.apachefriends.org/en/xampp-macosx.html

(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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: