Undefined mcrypt function after upgrading OSX to "El Capitan"

I have a problem with the mcrypt extension after upgrading "Yosemite" to "El Capitan".

Fatal error: call to undefined function mcrypt_decrypt () in / Users / Pilipe / Sites / prestashop -test / classes / Rijndael.php on line 68

In my php.ini, I added this line:

extension = "/USR/local/ Basement/php56-Mcrypt/5.6.13/mcrypt.so"

When I run this command line:

php -i | grep 'mcrypt'

I have:

Additional .ini files parsed => /usr/local/etc/php/5.6/conf.d/ext-mcrypt.ini
Registered stream filters => zlib., Bzip2., Convert.iconv., String.rot13, string.toupper, string.tolower, string.strip_tags, convert., Consumed, dechunk, mcrypt., Mdecrypt.
PHP warning: unknown. You cannot rely on the system time zone settings. You must use the date.timezone parameter or the date_default_timezone_set () function. If you used any of these methods and you still get this warning, most likely you are mistaken with the time zone identifier. At the moment, we have selected the time zone "UTC", but please set date.timezone to select the time zone. in Unknown on line 0
mcrypt
mcrypt support =>
mcrypt_filter support =>
mcrypt.algorithms_dir => no value => no value
mcrypt.modes_dir => no value => no value
PWD => /usr/local/Cellar/php56-mcrypt/5.6.13
_SERVER ["PWD"] => /usr/local/Cellar/php56-mcrypt/5.6.13

Php -v command:

PHP 5.6.13 (cli) (built: October 2, 2015 23:07:16)
Copyright (c) 1997-2015 PHP group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies

I installed mcrypt with:

brew install php56-mcrypt

I have done this:

brew link php56-mcrypt

Why does mcrypt not work?

Thanks in advance.

Sincerely Philip.

+5
source share
1 answer

I managed to solve this problem by uninstalling Homebrew, reinstalling Homebrew, and then installing php 5.6 mcrypt package. The advantage of this method over the Pilipe solution is that it does not require disabling the new Integrity Protection (SIP) system.

// Uninstall Homebrew [sudo] rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup // Reinstall Homebrea ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" // Install mcrypt brew install php53-mcrypt // Test mcrypt mcrypt -v // should result in // Mcrypt v.0.9.9 (i386-apple-darwin15.0.0) // Linked against libmcrypt v.2.5.8 // Copyright (C) 1998-2002 Nikos Mavroyanopoulos ( nmav@gnutls.org ) 
+1
source

Source: https://habr.com/ru/post/1232840/


All Articles