How to configure memcache in XAMPP mac osx lion

How to install memcache in XAMPP, Mac OSX Lion. It was pretty simple in Leopard (using this link http://m-schmidt.eu/2010/03/30/develop-memcached-web-apps-with-xampp-under-mac-os-x/ ), but I installed a new Lion, and it seems that memcache is not installing.

I tried this at https://gist.github.com/1301997 , but the result did not work !!

Can anyone suggest what to do.

+4
source share
2 answers

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

  • Rebooted Apache Server

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

+6
source

First install the Xampp developer tools. Then

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

A restart of the Apache server is also not required.

Or you can check it out for a complete guide. http://wiki.cerb5.com/wiki/Setup:Development/XAMPP/Mac_OS_X

+4
source

Source: https://habr.com/ru/post/1401901/


All Articles