Home >Backend Development >PHP Tutorial >Detailed graphic and text explanation of how to install mcrypt extension on ubuntu14php5.5

Detailed graphic and text explanation of how to install mcrypt extension on ubuntu14php5.5

黄舟
黄舟Original
2017-03-23 09:31:021627browse

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用户执行上面方案二的命令去启用它;

Detailed graphic and text explanation of how to install mcrypt extension on ubuntu14php5.5

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn