调用未定义的函数mcrypt_decrypt()-即使安装了php5-mcrypt [英] Call to undefined function mcrypt_decrypt() - even when php5-mcrypt installed
问题描述
所以我无法停止获取错误:
So I can't stop getting the error:
PHP Fatal error: Call to undefined function mcrypt_decrypt() in
即使安装了php5_mcrypt,我也已经重新安装了很多次php,但我无法使其正常工作!
Even when I have php5_mcrypt installed, I've reinstalled php quite a few times but I can't get it working!
更多信息:
mandatory@mandatorys-box:~/Desktop/bots$ dpkg -l | grep php
ii libapache2-mod-php5 5.5.3+dfsg-1ubuntu2.1 amd64 server-side, HTML-embedded scripting language (Apache 2 module)
ii php5 5.5.3+dfsg-1ubuntu2.1 all server-side, HTML-embedded scripting language (metapackage)
ii php5-cli 5.5.3+dfsg-1ubuntu2.1 amd64 command-line interpreter for the php5 scripting language
ii php5-common 5.5.3+dfsg-1ubuntu2.1 amd64 Common files for packages built from the php5 source
ii php5-curl 5.5.3+dfsg-1ubuntu2.1 amd64 CURL module for php5
ii php5-json 1.3.1+dfsg-2 amd64 JSON module for php5
ii php5-mcrypt 5.4.6-0ubuntu3 amd64 MCrypt module for php5
ii php5-mysql 5.5.3+dfsg-1ubuntu2.1 amd64 MySQL module for php5
ii php5-readline 5.5.3+dfsg-1ubuntu2.1 amd64 Readline module for php5
不知道问题出在哪里,尝试了一切.
No idea what the problem is, tried everything.
更多信息:
mandatory@mandatorys-box:~/Desktop/bots$ php -v
PHP 5.5.3-1ubuntu2.1 (cli) (built: Dec 12 2013 04:24:35)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend Technologies
推荐答案
安装是一回事.启用是另一回事.请确保您的/etc/php.ini
文件包含以下行:
Installing is one thing. Enabling is another. Please make sure your /etc/php.ini
file contains the following line :
extension=mcrypt.so
如果找不到php.ini
,请创建一个包含以下内容的test.php
文件:
If you can't find your php.ini
, create a test.php
file containing :
<?php phpinfo(); ?>
使用php test.php | grep ".ini"
执行它,您将找到ini文件的路径.其中之一必须包含上面的extension=
行.
Execute it with php test.php | grep ".ini"
, and you'll find the paths to your ini files. One of them must include the extension=
line above.
这篇关于调用未定义的函数mcrypt_decrypt()-即使安装了php5-mcrypt的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!