PHP警告:模块'imagick'已在第0行的Unknown中加载,需要一些帮助

时间:2019-04-30 08:45:21

标签: ubuntu-16.04 plesk-onyx

所以我今天检查了我的垃圾邮件文件夹,并通过服务器发送了122条消息,指出: PHP警告:模块'imagick'已在第0行的Unknown中加载

不停地不断向我发送此消息。

用Google对其进行搜索,由于我需要逐步回答,因此仍然不知道如何解决它。

在堆栈上发现了一个类似的问题,但它使我难以理解。

我正在使用最新的Plesk Onyx,并且操作系统为Ubuntu 16.04.6LTS‬。

当我运行php 7.3时,我希望当我在plesk中卸载php 7.0时,它会消失,但不幸的是没有。

它是从这里发送的

Cron <root@server>   [ -x /usr/lib/php/sessionclean ] && /usr/lib/php/sessionclean

然后是php --ini(在论坛上了解到)之后的结果:

PHP Warning:  Module 'imagick' already loaded in Unknown on line 0
Configuration File (php.ini) Path: /etc/php/7.0/cli
Loaded Configuration File:         /etc/php/7.0/cli/php.ini
Scan for additional .ini files in: /etc/php/7.0/cli/conf.d
Additional .ini files parsed:      /etc/php/7.0/cli/conf.d/00-ioncube-loader-7.0.ini,
/etc/php/7.0/cli/conf.d/10-mysqlnd.ini,
/etc/php/7.0/cli/conf.d/10-opcache.ini,
/etc/php/7.0/cli/conf.d/10-pdo.ini,
/etc/php/7.0/cli/conf.d/15-xml.ini,
/etc/php/7.0/cli/conf.d/20-calendar.ini,
/etc/php/7.0/cli/conf.d/20-ctype.ini,
/etc/php/7.0/cli/conf.d/20-curl.ini,
/etc/php/7.0/cli/conf.d/20-dom.ini,
/etc/php/7.0/cli/conf.d/20-exif.ini,
/etc/php/7.0/cli/conf.d/20-fileinfo.ini,
/etc/php/7.0/cli/conf.d/20-ftp.ini,
/etc/php/7.0/cli/conf.d/20-gd.ini,
/etc/php/7.0/cli/conf.d/20-gettext.ini,
/etc/php/7.0/cli/conf.d/20-iconv.ini,
/etc/php/7.0/cli/conf.d/20-imagick.ini,
/etc/php/7.0/cli/conf.d/20-imap.ini,
/etc/php/7.0/cli/conf.d/20-json.ini,
/etc/php/7.0/cli/conf.d/20-mbstring.ini,
/etc/php/7.0/cli/conf.d/20-mysqli.ini,
/etc/php/7.0/cli/conf.d/20-pdo_mysql.ini,
/etc/php/7.0/cli/conf.d/20-pdo_sqlite.ini,
/etc/php/7.0/cli/conf.d/20-phar.ini,
/etc/php/7.0/cli/conf.d/20-posix.ini,
/etc/php/7.0/cli/conf.d/20-readline.ini,
/etc/php/7.0/cli/conf.d/20-shmop.ini,
/etc/php/7.0/cli/conf.d/20-simplexml.ini,
/etc/php/7.0/cli/conf.d/20-sockets.ini,
/etc/php/7.0/cli/conf.d/20-sqlite3.ini,
/etc/php/7.0/cli/conf.d/20-sysvmsg.ini,
/etc/php/7.0/cli/conf.d/20-sysvsem.ini,
/etc/php/7.0/cli/conf.d/20-sysvshm.ini,
/etc/php/7.0/cli/conf.d/20-tokenizer.ini,
/etc/php/7.0/cli/conf.d/20-wddx.ini,
/etc/php/7.0/cli/conf.d/20-xmlreader.ini,
/etc/php/7.0/cli/conf.d/20-xmlwriter.ini,
/etc/php/7.0/cli/conf.d/20-xsl.ini,
/etc/php/7.0/cli/conf.d/20-zip.ini,
/etc/php/7.0/cli/conf.d/zend_extensions_psa.ini

我已经知道,当您了解linux时,它可能很容易修复,但是我正在学习中,并且掌握的知识很少。

有人可以协助我执行正确的命令吗?

欢呼

1 个答案:

答案 0 :(得分:0)

通过以下方式找到您的php.ini文件的位置:

php -i | grep Configuration
Configuration File (php.ini) Path => /usr/local/etc/php/7.4
Loaded Configuration File => /usr/local/etc/php/7.4/php.ini

打开php.ini文件并删除以下行:

extension=imagick.so

或将行更改为注释:

; extension=imagick.so