2

I'm using ubuntu 13.10. I need mcrypt extention on my terminal. My server already have installed it. I follow this question and lunchpad.
So I execute this commant:

sudo ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available
sudo php5enmod mcrypt
sudo service apache2 restart 

But when I try to above second line sudo php5enmod mcrypt command, Then I see a warning:

WARNING: Module mcrypt ini file doesn't exist under /etc/php5/mods-available.

How can I solve this problem?

Community
  • 1
  • 1
Imran
  • 3,031
  • 4
  • 25
  • 41
  • 1
    Did you checked whether the first line created a soft link at _/etc/php5/mods-available_ ? – Leo Prince Jan 16 '14 at 05:35
  • yea. I was check. and this link was available. – Imran Jan 16 '14 at 05:44
  • So try create a [hard](http://www.cyberciti.biz/faq/creating-hard-links-with-ln-command/) link instead. This must be _sudo ln /etc/php5/conf.d/mcrypt.ini /etc/php5/conf.d/mcrypt.ini_ before that make sure to remove the early added soft link from _/etc/php5/conf.d/mcrypt.ini_ – Leo Prince Jan 16 '14 at 05:49
  • @LeoPrince I did this but again an error `ln: accessing ‘/etc/php5/conf.d/mcrypt.ini’: No such file or directory` – Imran Jan 16 '14 at 06:03
  • _accessing ‘/etc/php5/conf.d/mcrypt.ini’: No such file or directory_ This seems like you are trying to access a non existing file. Try _php --ini_ command to see the existing .ini files for php. – Leo Prince Jan 16 '14 at 17:58
  • "Try php --ini command to see the existing .ini files for php. – Leo Prince Jan" I did this but this mcrypt.ini file is not available. – Ajay Dec 19 '14 at 13:02
  • It is best not to use mcrypt, it is abandonware, has not been updated in years and does not support standard PKCS#7 (née PKCS#5) padding, only non-standard null padding that can't even be used with binary data. mcrypt has many outstanding [bugs](https://sourceforge.net/p/mcrypt/bugs/) dating back to 2003. Instead consider using [defuse](https://github.com/defuse/php-encryption) or [RNCryptor](https://github.com/RNCryptor), they provide a complete solution and are being maintained and is correct. – zaph Oct 09 '16 at 00:03

1 Answers1

3

Install mcrypt for php5,

Command:

sudo apt-get install mcrypt php5-mcrypt
Ashish Viradiya
  • 389
  • 9
  • 17
techfang
  • 97
  • 7