Apologies in advance for the potential n00b questions, I am trying to install the mcrypt extension for PHP on my OSX Mountain Lion machine.
The following steps in terminal is what I have done so far to achieve my PHP install
cd /path/to/downloaded/php-5.3.21/ext/mcrypt/
/usr/bin/phpize
./configure
cd /path/to/downloaded/php-5.3.21
./configure --with-config-file-path=/private/etc/php.ini --with-apxs2=/usr/sbin/apxs
make
sudo make install
Which seems to work well and installs PHP 5.3.21 fine. I have then done
sudo nano /private/etc/php.ini
And included
extension=mcrypt.so
Along with an Apache restart, phpinfo() doesn't show that the mcrypt extension is loaded.
I then tried to specify the extension_dir inside php.ini, again with no luck.
I have done
locate mcrypt.so
/opt/local/lib/php/extensions/no-debug-non-zts-20090626/mcrypt.so
/usr/local/Cellar/php53-mcrypt/5.3.18/mcrypt.so
And tried both directories as the extension_dir, with no luck.
I have also tried the following, after much Googling
./configure --with-config-file-path=/private/etc/php.ini --with-apxs2=/usr/sbin/apxs --with-mcrypt
Which seems to work OK, but then upon "make", it returns
ext/mcrypt/mcrypt.o: No such file or directory
ext/mcrypt/mcrypt_filter.o: No such file or directory
Again, no success.
What am I doing wrong? It seems like the physical compile of mcrypt.so is not happening, or is compiling incorrectly as I would suspect there to be another mcrypt.so found under locate?
Anyone please help? I've gone through pages upon pages of Google searches with no luck!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…