[英]How can I add php extension mcrypt to Laravel/Homestead?
I have set up laravel/homestead
, now when I use composer install on a project, I get the error message: 我已经设置了
laravel/homestead
,现在在项目上使用composer install时,出现错误消息:
The requested PHP extension mcrypt is missing from your system
(I know I shouldn't use mcrypt anymore, but the project was handed over to me so I cant change this for now) (我知道我不应该再使用mcrypt了,但是该项目已移交给我,所以我现在不能更改它)
I m using PHP 7.1 (where mcrypt is marked deprecated I think but still usable if I activate it?) 我正在使用PHP 7.1(我认为其中mcrypt被标记为已弃用,但如果激活它仍然可以使用?)
php -v
shows "7.1.30" php -v
显示“ 7.1.30”
I added extension=php_mcrypt.dll
into my php.ini
and then restarted homestead (halt & up again) I can see the line in the php.ini
now but php -m
does not show mcrypt... and composer install still fails. 我将
extension=php_mcrypt.dll
添加到我的php.ini
,然后重新启动了宅基(再次暂停并重新启动),现在我可以看到php.ini
的行,但是php -m
不显示mcrypt ...并且composer安装仍然失败。
How can I activate mcrypt in homestead? 如何在宅基地激活mcrypt?
MCrypt
was removed from PHP7
for one of the main reasons why you want to upgrade PHP: Security. MCrypt
从取出PHP7
对于为什么要升级PHP的主要原因之一:安全。 The MCrypt
library is not maintained anymore. MCrypt
库不再维护。 There is no way to fix it on Windows, it's simply not there anymore. 无法在Windows上对其进行修复,根本不再存在。 You need to change the code or downgrade (not recommended!!!).
您需要更改代码或降级(不建议!!!)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.