laravel Mac OS X El Capitan 需要 Mcrypt PHP 扩展
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33484248/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Mcrypt PHP extension required in Mac OS X El Capitan
提问by devo
Getting error Mcrypt PHP extension required.
with Laravel
in Mac OS X El Capitan.
得到错误Mcrypt PHP extension required.
与Laravel
在Mac OS X埃尔卡皮坦。
Already installed the mcrypt using brew
.
已经使用 .mcrypt 安装了 mcrypt brew
。
brew install mcrypt
brew install homebrew/php/php55-mcrypt
sudo apachectl restart
which php
哪个php
/usr/local/bin/php
php --version
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
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
回答by 7883BE68261971DEAB54EB7603C2D8
Yu most rename original libphp:
于最重命名原来的libphp:
sudo mv /usr/libexec/apache2/libphp5.so /usr/libexec/apache2/libphp5.so.origin
and link the new homebrew php lib installed
并链接安装的新自制软件 php lib
sudo ln -s /usr/local/Cellar/php55/5.5.29/libexec/apache2/libphp5.so /usr/libexec/apache2/libphp5.so
and then restart apachectl
然后重启apachectl
sudo apachectl restart
that works for me
这对我行得通
回答by David Wickstr?m
I think this is what you are looking for:
我认为这就是你要找的:
http://phpbrew.github.io/phpbrew/
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.
它允许您构建任意数量的 php 版本,在它们之间切换并设置默认值。添加和删除扩展等。
Good luck!
祝你好运!