Question

I was able to successfully install the mcrypt extension on Mountain Lion but I'm having a difficult time installing the extension on Mavericks.

For reference, I'm following this guide: http://www.coolestguidesontheplanet.com/install-mcrypt-php-mac-osx-10-9-mavericks-development-server/

The only inconsistency I've noticed is that by running php -v from the command line, I'm showing PHP version 5.3.15 - whereas the web server appears to be running 5.4.17. I downloaded 5.4.17 to compile mcrypt.

Basically, everything runs according to plan until the very end. Rather than installing the shared extensions into the new directory, /usr/lib/php/extensions/no-debug-non-zts-20100525, I get a message that says:

Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20090626/

EDIT:

The issue appears to be that the web server's PHP was compiled with module API: 20100525 and the system is still using 5.3.15 (which is API: 20090626), hence the error.

I'm assuming you can't (easily) update the system version of PHP. What do I need to do to get the module and PHP APIs to match?

Thanks in advance for any help.

Était-ce utile?

La solution

For reference of others finding this thread..

Here is an automated Mcrypt installer for 10.8 and 10.9. http://topicdesk.com/downloads/mcrypt/mcrypt-download

Less than a minute to install this way.

Autres conseils

I noticed that php 5.4.17 is located in /usr/bin and 5.3.15 is in /usr/local/bin,

so I:

  • created symlinks in /usr/local/bin to phpize and php in /usr/bin.
  • After I verified that phpize -v and php were pointing to the correct version, it was simply a matter of recompiling the mcrypt extension. After doing so, the extensions were installed in the correct directory:

Installing shared extensions: /usr/lib/php/extensions/no-debug-non-zts-20100525/

I think in retrospect all I needed to do was add /usr/bin to my path variable so that it checks /usr/bin before /usr/local/bin.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top