Install php5-mcrypt
sudo apt-get install php5-mcrypt
Edit phpConfiguration file
sudo gedit /etc/php5/apache2/php.ini
Add under extension (any independent line will do)
extension=php_mcrypt.so (原来的php5-mcrypt.so无效)
Save and restart apache2
sudo /etc/init.d/apache2 restart
If there is no mcrypt extension in your phpinfo after restarting:
Option 1:
cd /etc/php5/cli/conf.d sudo ln -s ../../mods-available/mcrypt.ini 20-mcrypt.ini
Option 2:
cd /etc/php5/cli/conf.d sudo ln -s ../../mods-available/mcrypt.ini 20-mcrypt.ini php5enmod mcrypt service apache2 restart ps:对于Ubuntu,简单的安装php5-mcrypt并不能正常工作,你需要以root用户执行上面方案二的命令去启用它;
The above is the detailed content of Detailed graphic and text explanation of how to install mcrypt extension on ubuntu14php5.5. For more information, please follow other related articles on the PHP Chinese website!