Skip to content

Instantly share code, notes, and snippets.



Last active Dec 15, 2015
What would you like to do?
Install PHP Mcrypt on Mac OS X 10.8 "Mountain Lion"
# Download PHP 5.3.15 Source
cd /usr/local/src
curl -L -O
tar -xzvf php-5.3.15.tar.gz
# Download libmcrypt
cd /usr/local/src
curl -O
tar -xzvf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8
MACOSX_DEPLOYMENT_TARGET=10.8 CFLAGS='-O3 -fno-common -arch i386 -arch x86_64' LDFLAGS='-O3 -arch i386 -arch x86_64' CXXFLAGS='-O3 -fno-common -arch i386 -arch x86_64' ./configure --disable-dependency-tracking
make -j6
sudo make install
# Make PHP Extension
cd php-5.3.15/ext/mcrypt
sudo make install
# Edit PHP Configuration
sudo nano /etc/php.ini
# Restart Apache
sudo apachectl restart
# Verify Installation
php --info | grep crypt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment