I have Mac OS X 10.8.3 with upgraded PHP to 5.4.13 (I upgraded using the answer to Upgrade to PHP 5.4 on MAC ...).
First of all I tried to install it via homebrew and it doesn't work. After that I tried to install it from source like on this. Last thing I tried is installation via macports.
I found many tutorials on Stack Overflow and finally I tried this,
but I install php54-mcrypt
Now I have following state:
lukal$ mcrypt -v Mcrypt v.0.9.9 (i386-apple-darwin12.2.0) Linked against libmcrypt v.2.5.8 Copyright (C) 1998-2002 Nikos Mavroyanopoulos (email@example.com) lukal$ which mcrypt /opt/local/bin/mcrypt lukal$ php -v PHP 5.4.13 (cli) (built: Mar 17 2013 22:39:50) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies lukal$ which php /usr/local/bin/php
Also I changed my $PATH and now I have this:
phpinfo() for location of php.ini: picture
From phpinfo() you can see the mcrypt part: picture
I add this extra line to include mcrypt extension in /usr/local/php5/lib/php.ini
[mcrypt] ; For more information about mcrypt settings see http://php.net/mcrypt-module-open ; Directory where to load mcrypt algorithms ; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt) ;mcrypt.algorithms_dir= ; Directory where to load mcrypt modes ; Default: Compiled in into libmcrypt (usually /usr/local/lib/libmcrypt) ;mcrypt.modes_dir= extension=/opt/local/lib/php54/extensions/no-debug-non-zts-20100525/mcrypt.so
Please help me with this problem. If I forgot to post some information, ask me for them. Sorry about this links but I don't have enough reputation to add more than two links.