kramer65
kramer65

Reputation: 53843

How to enable mcrypt in php on Mac OSX 10.9?

Since I want to start learning Laravel, I need to install mcrypt in php. I'm on Mac OSX 10.9 and I installed apache and php manually (no mamp or anything like it) so I followed this guide to install mcrypt. The whole procedure works as expected (no errors), but after restarting the server using sudo apachectl restart I have a look at the output of phpinfo(), and I can't find any mentioning of mcrypt.

Since I don't think I had any errors in the process of compiling and installing, I don't really know where to look for the mistake. Does anybody know what would be logical things to check for?

Upvotes: 2

Views: 5486

Answers (3)

fucus on
fucus on

Reputation: 51

http://topicdesk.com/downloads/mcrypt/mcrypt-download

You can download mcrypt installer from here. It works for me!

Upvotes: 0

Natwar Singh
Natwar Singh

Reputation: 2275

By default mcrypt lib is not installed on Mac OSX 10.9. So you have to first install it. You can get it from sourcefroge.net. You also need php 5.4.17 source( check your php version first php -v). You can get it from github. extract both folders and.

Install autoconf

brew install autoconf

Build and install mcrypt lib

cd libmcrypt-2.5.8
./configure
make
sudo make install

Build php extension

cd php-5.4.17/ext/mcrypt/
/usr/bin/phpize
./configure
make
sudo make install

Finally add extension to php.ini

extension=mcrypt.so

Restart apache sudo apachectl restart

For more detailed info you can check it

Upvotes: 1

user3298482
user3298482

Reputation: 31

I have the same problem, on MAC OS X 10.9, no mcrypt library working. After some hours and many headaches (I'm not so skilled...) I found this guide, and finally get it working on my local machine: http://jenssegers.be/blog/49/installing-the-php-mcrypt-extension-on-osx-10-9-mavericks

The passage I missed were to go in the ext/mcrypt dir of a new php downloaded package and then type:

cd php-5.4.17/ext/mcrypt/ /usr/bin/phpize ./configure make sudo make install

Then add extension=mcrypt.so in my php.ini file.

That's it. Hope this helps!

Upvotes: 3

Related Questions