질문 Q #11461
The Encrypt library requires the Mcrypt extension. ???
람이 2014-07-08 15:27:22
centos 6.3 설치 후 기본적인 APM을 설치하였는데 해당 관련 라이브러리 php-mcrypt 를 설치했음에도 무엇이 문제인지

The Encrypt library requires the Mcrypt extension.

이런 메세지가 나옵니다.

/config/autoload.php 안에
$autoload['libraries'] = array('database','session','pagination','email');
 부분을 설정하면 발생합니다.

'session' 을 지우면 나오지 않구요...

혹시 몰라서

/libraries/MY_Session.php 을 넣어 두었습니다.


The Encrypt library requires the Mcrypt extension.

이 에러에 대해 아시는 분 저에게 도움 좀 주세요 (제가 서버도, C.I도 어설프게 알아서...)
답변 4
#1 한대승(불의회상) 2014-07-08 16:19:06
에러 그대로 php Mcrypt extension이 설치 되어 있지 않아 발생한 에러 입니다.

phpinfo(); 로 로드된 extension 확인 해 보세요.
#2 람이 2014-07-08 16:22:38
네 그러네요... 결국 구글링을 통해 아래와 같이 힘겹게 해결 했습니다.

cent os 6.3 인경우이구요...

wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
yum install php-mcrypt*
service httpd restart

혹시 나중에 제가 다시 틀릴지도 몰라서 겸사 겸사 올려 둡니다.
#3 Nexist 2015-06-02 20:39:19
다 올려주시던지.... ....

http://stackoverflow.com/questions/17109818/install-php-mcrypt-on-centos-6


 

I had the same issue, and found the previous suggestions gave me enough info to get it working on my server. The following is what I did:

1) Install EPEL repository (From: http://www.rackspace.com/knowledge_center/article/installing-rhel-epel-repo-on-centos-5x-or-6x):

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm

2) Install it via:

yum update
yum install php-mcrypt*

The yum update updated the repository reference on my server then the 2nd command got what I needed :)

3) Restart your webserver. For my apache install I did:

service httpd restart
#4 Cabron 2019-06-21 10:22:26

오래전 글이지만 도움이 많이 되었습니다.

오래전 작성된 많은 소스를 보니 Mcrypt를 사용했더군요.

저는 다음과 같이 수정했습니다.

$this->load->library('encrypt'); encrypt 라이브러리 대신 다음처럼 encryption 라이브러리를 사용합니다.
$this->load->library('encryption');

 

$this->encrypt->encode()  대신 $this->encryption->encrypt()

$this->encrypt->decode()  대신 $this->encryption->decrypt()

 

위와 같이 소스를 수정하여 openssl을 사용하니 괜찮군요.