Question

I have a Drupal site running on fresh MAMP PRO 3.0.3 install with the PHP version 5.3.28 on OS X Mavericks 10.9.2.

I installed memcache with pecl install memcache and added the extension=memcache.so line in php.iniunder the extensions section, but still Drupal shows multiple You must enable the PECL memcached or memcache extension to use memcache.inc. errors on top of the page.

phpinfo() on the Drupal root directory tells me that the configuration file loaded is at:

/Library/Application Support/appsolute/MAMP PRO/conf/php5.3.28.ini

and the extension dir is:

/Applications/MAMP/bin/php/php5.3.28/lib/php/extensions/no-debug-non-zts-20090626/

$ cat "/Library/Application Support/appsolute/MAMP PRO/conf/php5.3.28.ini" | grep memcache extension=memcache.so

$ ls /Applications/MAMP/bin/php/php5.3.28/lib/php/extensions/no-debug-non-zts-20090626/ | grep memcache

-rwxrwxr-x 1 user admin 65K Mar 28 14:00 memcache.so*

What am I doing wrong or is this problem related to MAMP PRO 3? I've installed the memcached binaries with homebrew and the process is running.

I'm also using the Individual PHP versions for every host setting in MAMP.

When starting Apache, there is an error in the logs:

PHP Warning: PHP Startup: Unable to load dynamic library '/Applications/MAMP/bin/php/php5.3.28/lib/php/extensions/no-debug-non-zts-20090626/memcache.so' - dlopen(/Applications/MAMP/bin/php/php5.3.28/lib/php/extensions/no-debug-non-zts-20090626/memcache.so, 9): Symbol not found: _zend_new_interned_string Referenced from: /Applications/MAMP/bin/php/php5.3.28/lib/php/extensions/no-debug-non-zts-20090626/memcache.so Expected in: flat namespace in /Applications/MAMP/bin/php/php5.3.28/lib/php/extensions/no-debug-non-zts-20090626/memcache.so in Unknown on line 0

What does this mean.

Thanks for your help!

Was it helpful?

Solution

I did not get the memcache extension provided by pecl to work at all. I even installed PHP 5.3.14 but encountered the same problem. Then I cloned the php-memcached-mamp repository from github and used the memcached extension from there and it worked ok.

OTHER TIPS

Add intl extension to your configuration.

I just found this problem and another post that helped me fix it. macports installed php-config53 (not php-config) and I had a vagrant php-config from an old php 5.4 install. Removed /usr/bin/php-config and symlinked php=config53 -> php-config, re-rean pecl install memcache-beta and it worked.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top