生产服务器和本地服务器上的代码信号加密 [英] codeigniter encryption on production server and local server

查看:198
本文介绍了生产服务器和本地服务器上的代码信号加密的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用codeigniter加密类的加密密码在两台不同的机器上产生相同的加密密码?例如,我有一个生产站点在线与一些主机,我有我的计算机上的本地安装。但是当我将数据库从一个恢复到另一个时,密码不匹配。

Will a encrypted password using codeigniter's encryption class produce the same encrypted password on two different machines? For example, I have a production site online with some host and i have the local install on my computer. But the passwords don't match when i restore the database from one to the other.

推荐答案

但是我想出了解决方案,它可能是模糊的,但应该是足够简单的新手:

I was looking for an answer to this but I figured out the solution, it maybe vague but should be simple enough for novices:


  1. 安装 libmcrypt 并安装 php-mcrypt

一些发行版可能不同,我的位于:/etc/php/php.ini

Edit your php.ini file. Some distros may differ, mine is located at: /etc/php/php.ini

查找所有扩展程序,并添加取消注释或添加以下到您的php.ini文件。

Find where all the extensions are and add the uncomment or add the following to your php.ini file.

extension = mcrypt.so

extension=mcrypt.so

重新启动apache或任何网络服务器

Restart apache or whatever webserver you use.

这篇关于生产服务器和本地服务器上的代码信号加密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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