You can easily install the mcrypt extension to PHP 5.4 on Mac OS X 10.9 Mavericks Server. Here’s how:
Mavericks Upgrade Notice
If you’ve upgraded to Mavericks from an earlier version, and you’ve installed PHP extensions using MacPorts, read this article to upgrade PHP extensions for Mavericks server before continuing with this article.
Download and install MacPorts from http://macports.org.
The following steps are performed in the Terminal:
Force MacPorts to update:
sudo port -v selfupdate
Now, install mcrypt:
sudo port install php54-mcrypt
Next, you need to edit /etc/php.ini to add the extensions. Find the phrase Dynamic Extensions, and add:
extension=/opt/local/lib/php54/extensions/no-debug-non-zts-20100525/mcrypt.so
And finally, restart Apache:
sudo apachectl restart
To confirm installation, create a new PHP document called phpinfo.php with the following contents:
<?php phpinfo(); ?>
Point your browser to the URL of that file. If all went well, you’ll see this block:
mcrypt installed in Mac OS X 10.9 Mavericks Server’s native PHP 5.4
Pingback: Install memcache and APC on Mac OS X Server (snow leopard 10.6, Lion 10.7, Mountain Lion 10.8) | Garbage In Garbage Out : Tech Blog
Pingback: Add mcrypt to Mac OS X (Snow Leopard 10.6, Lion 10.7, Mountain Lion 10.8) | Garbage In Garbage Out : Tech Blog
Pingback: Rebuilding PHP extensions to work with Mac OS X Mavericks server and PHP 5.4 | Garbage In Garbage Out : Tech Blog