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
|