Richard
I found out that when I wanted to use phpmyadmin, it asked for the libmcrypt module. So here is how I added mcrypt to PHP:
First download the libmcrypt sourcecode (I’ve used version 2.5.8). Don’t download the normal mcrypt package!
First you need to unpack the source code and decide if you need the 32 bits or 64 bits version (of your apache/php installation).
for 64 bits use:
CXXFLAGS="-arch x86_64" \
./configure --disable-posix-threads
for 32 bits use:
For all versions use:
To compile and:
To install the library.
Next step is to recompile the php installation as described on these two pages:
Compiling PHP in 64 bits mode on Snow Leopard
The only change you need to make is to add:
To the configure statement and it will include this library for you.
For example:
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--sysconfdir=/etc \
--with-zlib \
--with-zlib-dir=/usr \
--with-openssl \
--enable-exif \
--enable-ftp \
--enable-mbstring \
--enable-mbregex \
--enable-sockets \
--with-mcrypt \
--with-mysql=/usr/local/mysql \
--with-pdo-mysql=/usr/local/mysql \
--with-mysqli=/usr/local/mysql/bin/mysql_config \
--with-apxs2=/usr/local/apache2/bin/apxs



Comments
4:44 pm
Might help somebody else from messing this part up:
Make sure you download the LIBMCRYPT-2.5.8 file and NOT the MCRYPT-2.6.8 file at sourceforge.
12:45 am
i follow these directions (and a couple other i’ve found on the net) but always end up with this response:
error: C++ compiler cannot create executables
See `config.log’ for more details.
what am i doing wrong? i’m in the libmcrypt directory… do i need to install xcode for this process?
2:49 pm
@Kristina, yes you need to install Xcode to get this working.