Softaculous


Topic : Can't get Memcached working on AMPPS


Posted By: mintystark on November 17, 2014, 10:10 pm
I wish AMPPS would come pre-installed with memcached, but until then I need to try and configure it myself.

So far I have gotten it installed, but PHP has errors connecting to it.

Here is what I have done so far:
Code

pecl download memcache
open memcached-2.2.0.tgz
cd memcached-2.2.0/memcached-2.2.0/
export CFLAGS="-arch i386"
/Applications/AMPPS/php-5.3/bin/phpize CFLAGS='-arch i386'
MACOSX_DEPLOYMENT_TARGET=10.9 CFLAGS='-arch i386' LDFLAGS='-arch i386' CXXFLAGS='-arch i386' ./configure --with-php-config=/Applications/AMPPS/php-5.3/bin/php-config
make
sudo make install


Everything runs with no errors.
Then I copy the memcached.so to the
Code

cp /Applications/AMPPS/php-5.3/lib/extensions/no-debug-non-zts-20090626/memcached.so /Applications/AMPPS/php-5.3/lib/extensions/ext/memcached.so


Afterwords I run the php.ini test
Code
/Applications/AMPPS/php-5.3/bin/php --ini


and I get
Code
Configuration File (php.ini) Path: /Applications/AMPPS/php-5.3/etc
Loaded Configuration File:        /Applications/AMPPS/php-5.3/etc/php.ini
Scan for additional .ini files in: /Applications/AMPPS/php-5.3/etc/php.d
Additional .ini files parsed:      (none)


I restart apache and then do some tests.
class_exists('Memcached')  returns true
However, Memcached does not show up in phpinfo();
Also When I try and connect:
Code
$mc = new Memcached();

My site crashes and shows a "The connection was reset" browser message.

Here is the bottom few lines of my Apache Error log:
Code
dyld: Symbol not found: _memcached_create
  Referenced from: /Applications/AMPPS/php-5.3/lib/extensions/ext/memcached.so
  Expected in: flat namespace

[Mon Nov 17 13:50:18.953115 2014] [core:notice] [pid 53238] AH00052: child pid 56107 exit signal Trace/BPT trap (5)


Othertimes I will try a different version and some other CFLAGS, but I always end up with the same results.  However, sometimes I get:
Code
dyld: Symbol not found: _memcached_lib_version
  Referenced from: /Applications/AMPPS/php-5.3/lib/extensions/ext/memcached.so
  Expected in: flat namespace

[Mon Nov 17 13:42:15.664186 2014] [core:notice] [pid 53238] AH00052: child pid 53249 exit signal Trace/BPT trap (5)


Please any help would be greatly appreciated.
I am using AMPPS 2.4 on Mac OS X 10.9

Thanks

Posted By: andreyvoloshko on November 27, 2014, 12:12 pm | Post: 1
I've the same problem. %(

Does anyone knows the solution?

Posted By: mintystark on December 30, 2014, 5:13 pm | Post: 2
Bump!
Can anyone help with this?

Posted By: Rishi_P on January 20, 2015, 11:11 am | Post: 3
Hi

give us your email id we will mail you memcached.so.

Posted By: mintystark on January 20, 2015, 1:22 pm | Post: 4
I just sent you an email from my Email ID.

Let me know if you did not receive it.
Thanks

Posted By: fmeetze on March 12, 2015, 10:41 am | Post: 5
I tried to compile the latest memcached extension under 5.4 in Ampps.  I'm getting the same issue:

Code

dyld: lazy symbol binding failed: Symbol not found: _memcached_create
  Referenced from: /Applications/AMPPS/php-5.4/lib/extensions/ext/memcached.so
  Expected in: flat namespace

dyld: Symbol not found: _memcached_create
  Referenced from: /Applications/AMPPS/php-5.4/lib/extensions/ext/memcached.so
  Expected in: flat namespace


Has anyone successfully created a working extension for memcached for Ampps?

Posted By: mintystark on March 12, 2015, 3:42 pm | Post: 6
Hi Rishi P,
I sent an email awhile back, but never got a response.
I am still looking for a solution.

Thanks

Posted By: elpoleto on March 13, 2015, 11:10 am | Post: 7
Hello
Had the same problem. You must download and install from source to get a memcache.so file in 32 and 64 bit mode.
I used this guide http://www.hacksparrow.com/install-memcached-on-mac-os-x.html

Posted By: mintystark on March 14, 2015, 10:15 pm | Post: 8
Thanks, but I don't think you read my post all the way.
I was able to get Memcached installed and working on Mac, but not able to get it working with PHP.  I did compile from source and I have tried many different methods.  The same issue comes down to the memcached.so file not working properly with the PHP version or something like that.

Posted By: elpoleto on March 17, 2015, 9:09 am | Post: 9
Make attention to "memcache" and "memcached".
Anyway i followed the instructions on the link i got you and everything work fine

Powered By AEF 1.0.8 © 2007-2008 Electron Inc.