3

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
Anshad Vattapoyil
  • 23,145
  • 18
  • 84
  • 132
  • http://coolestguidesontheplanet.com/install-mcrypt-for-php-on-mac-osx-10-10-yosemite-for-a-development-server/ – zod Nov 02 '15 at 18:31
  • 3
    `$ brew install php55-mcrypt` see this http://stackoverflow.com/questions/26493762/yosemite-el-captian-php-gd-mcrypt-installation – Kyslik Nov 02 '15 at 18:50
  • @Kyslik I have installed php56 using this answer and it's working fine.Thanks. – Anshad Vattapoyil Nov 06 '15 at 17:04

2 Answers2

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

0

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!

David Wickström
  • 397
  • 3
  • 11