分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 运营维护

[解决] Magento 2.1.3在PHP 7.1.0上

发布时间:2023-09-06 01:09责任编辑:蔡小小关键词:PHP

以下是如何在最新的PHP 7.1.0上安装和运行最新的Magento 2.1.3。

补丁安装文件

Magento 2.1.3检查php版本,并拒绝使用php 7.1.0进行安装。我们绕过它

打开setup / src / Magento / Setup / Model / PhpRedinessCheck.php并更改第79行

从:

$normalizedPhpVersion = $this->getNormalizedCurrentPhpVersion(PHP_VERSION);
至:

$normalizedPhpVersion = $this->getNormalizedCurrentPhpVersion(‘7.0.2‘);

2.禁止mcrypt警告

编辑vendor / magento / framework / Encryption / Crypt.php并将所有mcrypt / mdecrypt函数与@

@mdecrypt_generic
这是一个diff文件:

54c54
< ????????$this->_handle = @mcrypt_module_open($cipher, ‘‘, $mode, ‘‘);
---
> ????????$this->_handle = mcrypt_module_open($cipher, ‘‘, $mode, ‘‘);
56c56
< ????????????$maxKeySize = @mcrypt_enc_get_key_size($this->_handle);
---
> ????????????$maxKeySize = mcrypt_enc_get_key_size($this->_handle);
62c62
< ????????????$initVectorSize = @mcrypt_enc_get_iv_size($this->_handle);
---
> ????????????$initVectorSize = mcrypt_enc_get_iv_size($this->_handle);
80c80
< ????????????@mcrypt_module_close($this->_handle);
---
> ????????????mcrypt_module_close($this->_handle);
83c83
< ????????@mcrypt_generic_init($this->_handle, $key, $initVector);
---
> ????????mcrypt_generic_init($this->_handle, $key, $initVector);
93,94c93,94
< ????????@mcrypt_generic_deinit($this->_handle);
< ????????@mcrypt_module_close($this->_handle);
---
> ????????mcrypt_generic_deinit($this->_handle);
> ????????mcrypt_module_close($this->_handle);
138c138
< ????????return @mcrypt_generic($this->_handle, $data);
---
> ????????return mcrypt_generic($this->_handle, $data);
152c152
< ????????$data = @mdecrypt_generic($this->_handle, $data);
---
> ????????$data = mdecrypt_generic($this->_handle, $data);
清除缓存:

rm -rf var/cache/*
rm -rf var/generation/*

 

[解决] Magento 2.1.3在PHP 7.1.0上

原文地址:http://www.cnblogs.com/shenlongjue/p/7491120.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved