4

I am using php version 7 and using codeigniter framework so as per requirement I am encoding the string using :

$this->encrypt->encode('some_text');

I have called library using constructor

$this->load->library('encrypt');
$this->load->library('encryption');

but getting error:

The Encrypt library requires the Mcrypt extension
neubert
  • 15,947
  • 24
  • 120
  • 212
Anonymous
  • 1,074
  • 3
  • 13
  • 37
  • If you have composer installed try doing `composer require phpseclib/mcrypt_compat` – neubert Aug 13 '19 at 12:59
  • @neubert no idon't have installed composer – Anonymous Aug 15 '19 at 09:57
  • why codeigniter encrypt is supporting only php 5 not php 7 it is working in php 5 – Anonymous Aug 15 '19 at 10:00
  • https://wiki.php.net/rfc/mcrypt-viking-funeral explains why it's no longer working. It looks like there are no Windows releases for the mcrypt PECL extension (https://pecl.php.net/package/mcrypt). If there were Windows releases it'd look like https://pecl.php.net/package/ssh2 . As such I think https://github.com/phpseclib/mcrypt_compat is going to be your only option. – neubert Aug 15 '19 at 12:23

0 Answers0