3

I've installed the sphinx binaries and libraries and am now trying to install the PECL sphinx module.

My system is running OS X 10.6 with MAMP 1.8.2 installed. I try to install sphinx using the following command:

sudo pecl install sphinx

The PECL command outputs the following:

running: phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626

The versions above don't match the versions listed when doing a phpinfo(). It seems that PECL is trying to complie against the built-in version of PHP.

If I ignore the errors and continue the it will successfully compile and place the sphinx.so file in:

/usr/lib/php/extensions/no-debug-non-zts-20090626/sphinx.so

when in fact it should be:

/Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20060613/

I've tried copying the sphinx.so file to the MAMP extensions dir but when I restart apache PHP displays the following warning:

PHP Startup: Unable to load dynamic library '/Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20060613/sphinx.so

I think this is because MAMP is 32bit and the built-in PHP is 64bit so PECL complies for 64bit. I might be completely wrong but I did read this when I goggled on the topic.

Does anyone know how to get PECL to map to the MAMP version of PHP instead of the built-in version?

Camsoft
  • 911
  • 4
  • 12
  • 21

1 Answers1

2

if the problem still exists: Here's a link and some additional information: http://blog.achimbo.de/index.php/2010/05/03/installing-pecl-for-mamp/

Cheers, achim

user42105
  • 36
  • 2