Mcrypt to OSX

add mcrypt to mac os x server

You can easily install the mcrypt extension to PHP5 on Mac OS X Server. Here’s how:

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 memcached:
sudo port install php5-mcrypt

Copy the newly created shared object for mcrypt into Mac OS X’s default PHP5 extension directory:
sudo cp /opt/local/lib/php/extensions/no-debug-non-zts-20090626/mcrypt.so /usr/lib/php/extensions/no-debug-non-zts-20090626/

Next, you need to edit php.ini to add the extensions. Find the phrase Dynamic Extensions, and add:

extension=mcrypt.so

And finally, restart Apache:
sudo apachectl restart

Test if it working

php -m | grep mcrypt

Posted by 비오는날.

댓글을 달아 주세요