I’m going to assume you already have nginx and php-fpm installed and running.
- php5-mcrypt should be installed already (it comes bundled with php5-fpm). Just for safety,
apt-get install php5-mcrypt
- Create symlink to mods-avaliable,
ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available/mcrypt.ini
- Enable it.
php5enmod mcrypt
- Restart php-fpm,
service php5-fpm restart
- Restart nginx,
service nginx restart
Done!
Hello David!
There are some unnecessary steps in your tutorial. First of all you don’t need to restart nginx. php5-fpm has nothing to do with nginx. Nginx is just a proxy server. And you don’t need to create a symlink.
1. apt-get install php5-mcrypt
2. php5enmod mcrypt
3. service restart php5-fpm
Hi Dmitry,
The symlink is necessary in 14.04 (I should have cited this bug report in my initial post: https://bugs.launchpad.net/ubuntu/+source/php-mcrypt/+bug/1318021)
Also, you are correct, I did not need to restart nginx after the install. I did any ways just to be thorough.
-Dave
I just installed on a node running 14.04. It does require the symlink. I realize this post might be dated and things might have changed.
Hi, excuse me, but I’ve Ubuntu 14.04, Nginx and php5-fpm installed and running.
There is no /etc/php5/conf.d/ directory. “conf.d” is under /etc/php5/fpm/conf.d/
Anyway… the file mcrypt.ini is there, I also enabled it with command php5enmod mcrypt and I verified that is there with this:
andrea@andreagrandi:/etc/php5$ php5-fpm -m | grep mcrypt
mcrypt
but when I try to use a WordPress plugin that requires it, I get the same error that the library is missing.
How can I fix this?
This happened to me too Andrea. I eventually discovered that the libmcrypt files themselves were missing. Something like this is what fixed it for me:
[code]
apt-get remove php5-mcrypt
apt-get autoremove
apt-get install php5-fpm
apt-get install php5-mcrypt
[/code]
Hi guys I’m having the same errors as @Andrea Grandi
any solution out there ?
Thanks.
Hi.
Thank you very much.