php错误:加密库需要在codeigniter中的Mcrypt扩展 [英] php error: The Encrypt library requires the Mcrypt extension in codeigniter

查看:2325
本文介绍了php错误:加密库需要在codeigniter中的Mcrypt扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个登录和注册表单,并使用加密库加密密码..我使用Xampp为我的服务器和我的系统正常工作..

I have a login and sign up form and use the encrypt library to encrypt the password.. I am using Xampp for my server and my system works correctly..

代码加密密码:

$this->encrypt->encode('my password'); 

add encrypt library

add encrypt library

 $autoload['libraries'] = array('encrypt');

并在config中设置密钥:

and setting the secret key in config:

$config['encryption_key'] = 'nmsc encrypt secret key';

我的代码在Windows中使用xampp服务器很好,但是当我试图将我的网站上传到ubuntu服务器发生错误

My code works well using xampp server in windows but when Im trying to upload my website to ubuntu server I've got an error says


加密库需要Mcrypt扩展

The Encrypt library requires the Mcrypt extension

如何解决这个问题?请参阅此指南 https://ellislab.com/codeigniter/user-guide/libraries/ encryption.html ,但我不知道如何安装mcrypt。我的网站需要从ubuntu服务器运行。如何安装或修复此问题?

how to fix that problem? refering this guide https://ellislab.com/codeigniter/user-guide/libraries/encryption.html but I dont know how to install that mcrypt. my website needs to run from ubuntu server. how to install or fix that problem?

推荐答案

您应该安装php mcrypt模块;

You should install the php mcrypt module;

sudo apt-get install php5-mcrypt

sudo apt-get install php5-mcrypt

sudo php5enmod mcrypt

sudo php5enmod mcrypt

会很好;)

这篇关于php错误:加密库需要在codeigniter中的Mcrypt扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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