2015-10-02 1 views
3

J'ai un problème avec l'extension mcrypt après la mise à jour "Yosemite" à "El Capitan".Fonction non définie mcrypt après la mise à jour OSX à "El Capitan"

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

Dans mon php.ini, j'ai ajouté cette ligne:

extension="/usr/local/Cellar/php56-mcrypt/5.6.13/mcrypt.so"

Quand je lance cette ligne de commande:

php -i | grep 'mcrypt'

Je:

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: It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in Unknown on line 0
mcrypt
mcrypt support => enabled
mcrypt_filter support => enabled
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

Commande php -v:

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

J'ai installé mcrypt avec:

brew install php56-mcrypt

Je l'ai fait:

brew link php56-mcrypt

pourquoi Mcrypt il ne fonctionne pas?

Merci à l'avance.
Sincèrement Philippe.

+0

Avez-vous résolu votre problème? Parce que j'ai le même problème. –

+0

Non désolé, j'ai désactivé "SIP" mais j'ai toujours le même problème. – Pilipe

+0

Jetez un oeil à ma réponse ici http://stackoverflow.com/questions/32908829/error-in-mcrypt-after-upgrading-into-el-capitan-os – Zakaria

Répondre

1

J'ai été en mesure de résoudre ce problème en désinstallant Homebrew, en réinstallant Homebrew et en installant le paquet php 5.6 mcrypt. L'avantage de cette méthode par rapport à la solution de Pilipe est qu'elle ne nécessite pas de désactiver le nouveau système SIP (System Integrity Protection).

// 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 ([email protected])