zoukankan      html  css  js  c++  java
  • [解决] Magento 2.1.3在PHP 7.1.0上

    以下是如何在最新的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/*

     
  • 相关阅读:
    ORM 实现数据库表的增删改查
    数据库表设计(一对多,多对多)
    Razor模板引擎
    文件的上传(表单上传和ajax文件异步上传)
    生成验证码封装(新版)
    MD5加密
    反射的一些基本用法
    数据的增删改查(三层)<!--待补充-->
    linux文件的硬连接和软连接
    linux磁盘用满的两种情况
  • 原文地址:https://www.cnblogs.com/shenlongjue/p/7491120.html
Copyright © 2011-2022 走看看