调用未定义的函数mcrypt_decrypt() – 即使安装了php5-mcrypt
作者:互联网
所以我不能停止得到错误:
PHP Fatal error: Call to undefined function mcrypt_decrypt() in
即使我安装了php5_mcrypt,我已经重新安装了很多次php,但是我无法让它工作!
更多信息:
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
不知道问题是什么,尝试了一切.
更多信息:
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文件包含以下行:
extension=mcrypt.so
如果找不到php.ini,请创建一个test.php文件,其中包含:
<?php phpinfo(); ?>
用php test.php执行它grep“.ini”,你会找到你的ini文件的路径.其中一个必须包括上面的extension =行.
标签:mcrypt,php 来源: https://codeday.me/bug/20190930/1836571.html