Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP mcrypt not compiled properly

I have tried everything but I not able to fix this error. I installed PHP by downloading it and then ran:

brew install php55-mcrypt

I had initially installed it with PHP 5.3 then Laravel complained that it has to be greater than 5.4. So everything got messed up.

I am on MAC 10.7. Can someone help me?

php -v

PHP Warning:  PHP Startup: mcrypt: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20121212
These options need to match
 in Unknown on line 0
PHP 5.5.1 (cli) (built: Aug 14 2013 10:31:02) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
like image 828
Fox Avatar asked Aug 14 '13 18:08

Fox


1 Answers

brew reinstall mcrypt --build-from-source php56-mcrypt --build-from-source

Build from source is an option which will force brew to compile from source rather than using a bottle.

like image 96
Rahman Malik Avatar answered Sep 21 '22 13:09

Rahman Malik