Page 1 of 1

OSX: Laravel: Cannot get mcrypt working

Posted: Thu Apr 14, 2016 3:22 pm
by publicGenome
Hi Members,

When I load php info file I see PHP version 5.5.30
And I do not see my mcrypt extension present in the php info. I've been heading into this issue for over 10 days now. :banghead: :banghead: :crazy: :crazy:

which php
[text]
/usr/local/bin/php
[/text]
echo $PATH
[text]
/usr/bin/php:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/ncbi/blast/bin
[/text]
php -v
[text]
PHP 5.5.34
[/text]

[text]
OS X 10.11.3 El Capitan
[/text]

When I load my laravel application, I get message as:
[text]
Mcrypt PHP extension required.
[/text]
What should I do to get it working? Please help.

Re: OSX: Laravel: Cannot get mcrypt working

Posted: Thu Apr 14, 2016 3:39 pm
by Celauran
Are you using the PHP that comes with OS X? Homebrew? MAMP?

Re: OSX: Laravel: Cannot get mcrypt working

Posted: Thu Apr 14, 2016 4:04 pm
by publicGenome
Hi C,
Thanks much for your reply.

PHP with Homebrew.
I fixed path thing again. Now my PATH looks like:

[text]
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/ncbi/blast/bin
[/text]

which PHP
[text]
/usr/local/bin/php[/text]

Re: OSX: Laravel: Cannot get mcrypt working

Posted: Thu Apr 14, 2016 4:25 pm
by Celauran
brew install php55-mcrypt

Re: OSX: Laravel: Cannot get mcrypt working

Posted: Fri Apr 15, 2016 7:19 am
by publicGenome
Thanks Cel for your reply. That installation command had been run. :)

It was due to .ini file.
I was using /etc/php.ini instead of /usr/local/bin/php/lib/php.ini

This solved the issue. :)