This is what helped me with Mac OS X Mountain Lion, XAMPP 1.7.3 (the standard way with pecl install "does not work because it compiles the 64 bit extension, while XAMPP is built in 32 bit mode)
(The first sign you do not have if you receive such 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 creating the memcache extension , I changed the PEAR installer by adding a line that configures the 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 the terminal I did this:
cd / Applications / XAMPP / xamppfiles / bin
sudo ./pecl install memcache
And voila! I have a php memcache extension! Have a nice day!:)
source share