2013年8月10日 星期六

Installing mcrypt on OSX 10.8.2 - PHP 5.3.15 with MacPorts

Download and install MacPorts from http://macports.org.
The following steps are performed in the Terminal:
Force MacPorts to update (will only work if Apple's Xcode installed):
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
en → zh
使用MacPorts 。

沒有留言:

wibiya widget