问题
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