Windows中具有mcrypt的PHP 7.2 [英] PHP 7.2 with mcrypt in Windows

查看:187
本文介绍了Windows中具有mcrypt的PHP 7.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一些庞大的旧系统,它们对PHP mcrypt的依赖极为重要和至关重要(包括数据库中的数据存储).我需要找到一种方法,在升级到PHP 7.2(已经可以正常工作)的同时维护该库.

There are some huge legacy systems whose dependencies on PHPs' mcrypt are extremely important and vital (including the data storage in database). I need to find a way to maintain this library while upgrading to PHP 7.2 (which already worked fine).

我的本​​地测试环境是Windows.实时环境在CentOS上运行.

My local test environment is Windows. The live environment is run on CentOS.

我看到的一些答案是解密并将mcrypt更改为openssl(我认为目前无法实现,因为要解密的数据很多.)

Some of the answers I have seen is decrypting and change mcrypt to openssl (I think that's not possible at the moment since there's a lot of data to decrypt).

另一种方式可以下载具有mcrypt -support的较低PHP版本,将扩展名复制并添加到php.ini中(我什至不知道该文件夹).

Another way lights to download a lower PHP version with mcrypt-support, copy the extension and add it to php.ini (I do not even know the folder).

由于安全问题,将PHP降级到5.6并不适用.

Downgrading PHP to 5.6 it's not suitable due to security issues.

在这种情况下可以做什么?

Any light in what could be done in this scenario?

推荐答案

基本上,我认为您已经提到了所有可能性,而您别无选择. 不要降级到PHP 5.6,这种方法没有未来 .

Basically I think you have mentioned all possibilities and you do not have a choice. Do not downgrade to PHP 5.6 this approach has no future.

由于要升级PHP的主要原因之一,MCrypt已从PHP中删除:安全性. MCrypt库不再维护. 因此,安装MCrypt扩展也不是一个好主意 .但这可能是一个临时解决方案(例如,遵循以下说明 https://serverpilot.io/community/articles/how-to-install-the-php-mcrypt-extension.html ).

MCrypt was removed from PHP for one of the main reasons why you want to upgrade PHP: Security. The MCrypt library is not maintained anymore. Therefore installing the MCrypt extension is also a bad idea. But it can be a temporary solution (follow e.g. those instructions https://serverpilot.io/community/articles/how-to-install-the-php-mcrypt-extension.html).

唯一好的解决方案是从mcrypt迁移到其他东西 .在Stackoverflow上已经有关于此主题的问题(例如从以下位置升级我的加密库Mcrypt转换为OpenSSL ).或者,您可以使用一些加密库.迁移大量代码/数据可能很麻烦,但这是这种情况下面向未来的方法.

The only good solution is migrating from mcrypt to something else. There are questions regarding this topic on Stackoverflow already (e.g. Upgrading my encryption library from Mcrypt to OpenSSL). Alternativly you could use some encryption library. Migrating a large amount of code/data might be a pain but this is the most future-oriented approach in this case.

这篇关于Windows中具有mcrypt的PHP 7.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆