Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I install memcache from pecl and I got 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/' - dlopen(/Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/, 9): no suitable image found. Did find: /Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/ 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/

I got

/Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/ Mach-O 64-bit bundle x86_64

I'm using Mac OS x 10.6.4 64bits

share|improve this question
up vote 1 down vote accepted

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 running file on php binary (or php module if used as module)

share|improve this answer
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 i386 – saturngod Aug 13 '10 at 1:42
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-static – saturngod Aug 13 '10 at 2:55

The main answer helped a lot for figuring out that I had compiled wrong, but to compile the module correctly I found this worked for me:

$ cd your-php-module
$ /Applications/MAMP/bin/php5/bin/phpize
$ ./configure CFLAGS="-arch i386" --with-php-config="/Applications/MAMP/bin/php5/bin/php-config"
$ make
$ make install
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.