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/*

     
  • 相关阅读:
    mysql中事务隔离级别可重复读说明
    Zookeeper安装与启动
    PHP闭包之bind和bindTo
    使用WebPack打包
    用Python下载momentum中的精美壁纸
    supervisor使用
    Shell脚本:RedisKey批量删除
    使用Certbot配置站点的https
    PHPfmt代码格式化
    创建用私钥签名的证书
  • 原文地址:https://www.cnblogs.com/shenlongjue/p/7491120.html
Copyright © 2011-2022 走看看