OSX: Laravel: Cannot get mcrypt working

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
publicGenome
Forum Contributor
Posts: 110
Joined: Thu Apr 16, 2015 7:55 am

OSX: Laravel: Cannot get mcrypt working

Post 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.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: OSX: Laravel: Cannot get mcrypt working

Post by Celauran »

Are you using the PHP that comes with OS X? Homebrew? MAMP?
publicGenome
Forum Contributor
Posts: 110
Joined: Thu Apr 16, 2015 7:55 am

Re: OSX: Laravel: Cannot get mcrypt working

Post 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]
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: OSX: Laravel: Cannot get mcrypt working

Post by Celauran »

brew install php55-mcrypt
publicGenome
Forum Contributor
Posts: 110
Joined: Thu Apr 16, 2015 7:55 am

Re: OSX: Laravel: Cannot get mcrypt working

Post 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. :)
Post Reply