Home > Backend Development > PHP Tutorial > apt-get install php5-mcrypt后extension中还是没有,是要设置什么地方吗?

apt-get install php5-mcrypt后extension中还是没有,是要设置什么地方吗?

WBOY
Release: 2016-06-06 20:40:42
Original
1312 people have browsed it

<code>$ apt-get install php5-mcrypt
</code>
Copy after login
Copy after login

我安装了以后在$ php -m中还是没有显示mcrypt扩展,是需要进一步设置还是怎么回事?

回复内容:

<code>$ apt-get install php5-mcrypt
</code>
Copy after login
Copy after login

我安装了以后在$ php -m中还是没有显示mcrypt扩展,是需要进一步设置还是怎么回事?

<code>cd /etc/php5/cli/conf.d

sudo ln -s ../../mods-available/mcrypt.ini 20-mcrypt.ini
</code>
Copy after login

Ubuntu 不知道什么原因,现在安装mcrypt扩展默认没有链接好配置文件,所以你得自己手动软链接一次

来源:
安装php5-mcrypt

<code>sudo apt-get install php5-mcrypt
</code>
Copy after login

编辑php配置文件

<code>sudo gedit /etc/php5/apache2/php.ini 
</code>
Copy after login

在extension下面加上(任何独立一行就行)

<code>extension=php_mcrypt.so (原来的php5-mcrypt.so无效)
</code>
Copy after login

保存,重启apache2

<code>sudo /etc/init.d/apache2 restart
</code>
Copy after login

来源:http://wiki.ubuntu.org.cn/Apache

php -m 显示的是命令行PHP的配置 这个你就懂了吧

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template