PHP Codeigniter Unexpected Error(Module 'imagick' already loaded)

大城市里の小女人 提交于 2019-12-27 03:36:42

问题


I am using PHP Codeigniter and unexpectedly this error is occur on live server. Can any one help.

Severity: Core Warning

Message: Module 'imagick' already loaded

Filename: Unknown

Line Number: 0


回答1:


That is from php loading up. In your university files there are 2 Lines loading the imagick extension

Assuming a Linux server it's likely located /etc/php/conf.d or similar.

Ubuntu server uses /etc/php7/apache/conf.d for example assuming your using php as an Apache module

Inside there you should be able to grep for the word imagick Just remove one of them




回答2:


In index.php file change this line

define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'development');

to

define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'production');



回答3:


I have similar issue when using Codeigniter. The error not show when running in local, but show in server. My solution is add script below at the end of my index.php

ini_set('display_errors','off');

Now, my error is gone. Hope this can help.



来源:https://stackoverflow.com/questions/44484478/php-codeigniter-unexpected-errormodule-imagick-already-loaded

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!