Anshad Vattapoyil
Anshad Vattapoyil

Reputation: 23463

Mcrypt PHP extension required in Mac OS X El Capitan

Getting error Mcrypt PHP extension required. with Laravel in Mac OS X El Capitan.

Already installed the mcrypt using brew.

brew install mcrypt
brew install homebrew/php/php55-mcrypt
sudo apachectl restart

which php

/usr/local/bin/php

php --version

PHP 5.5.30 (cli) (built: Oct  3 2015 23:48:03) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies

php --ini

Configuration File (php.ini) Path: /usr/local/etc/php/5.5
Loaded Configuration File:         /usr/local/etc/php/5.5/php.ini
Scan for additional .ini files in: /usr/local/etc/php/5.5/conf.d
Additional .ini files parsed:      /usr/local/etc/php/5.5/conf.d/ext-mcrypt.ini

Upvotes: 3

Views: 5231

Answers (2)

Yu most rename original libphp:

sudo mv /usr/libexec/apache2/libphp5.so /usr/libexec/apache2/libphp5.so.origin

and link the new homebrew php lib installed

sudo ln -s /usr/local/Cellar/php55/5.5.29/libexec/apache2/libphp5.so  /usr/libexec/apache2/libphp5.so

and then restart apachectl

sudo apachectl restart

that works for me

Upvotes: 2

David Wickström
David Wickström

Reputation: 397

I think this is what you are looking for:

http://phpbrew.github.io/phpbrew/

It lets you build any number of php versions, switch between them and set defaults. Add and remove extensions and more.

Good luck!

Upvotes: 0

Related Questions