I install memcache from pecl and I got memcache.so. After that I add in php.ini but I got a error.
[12-Aug-2010 13:02:24] PHP Warning: PHP Startup: Unable to load dynamic library '/Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/memcache.so' - dlopen(/Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/memcache.so, 9): no suitable image found. Did find: /Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/memcache.so: mach-o, but wrong architecture in Unknown on line 0
I tried
$file /Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/memcache.so
I got
/Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/memcache.so: Mach-O 64-bit bundle x86_64
I'm using Mac OS x 10.6.4 64bits
-
I guess it's probbaly because php is not build in 64 bit, so you are trying to load a 64 bit module to a 32 bit application and of course it won't work.
You can check this by runningfileon php binary (or php module if used as module)saturngod : Oh!!! yes. I got result like this. So, how to build i386 edition for memcache ? php: Mach-O universal binary with 2 architectures php (for architecture ppc): Mach-O executable ppc php (for architecture i386): Mach-O executable i386saturngod : I got it. I compile like this. phpsize CFLAGS='-O3 -fno-common -arch i386 -arch x86_64 -g -Os' LDFLAGS='-O3 -arch i386 -arch x86_64' CXXFLAGS='-O3 -fno-common -arch i386 -arch x86_64 -g -Os' ./configure --disable-dependancy-tracking --disable-shared -enable-staticFrom radius
0 comments:
Post a Comment