Question

multiple installations of a program?

Posted June 3, 2016 1k views
Apache PHP

I have installed Imagick on my server. However, while struggling to get it running I very likely installed it many times. At least that is what it looks like when I look in my error log. There I see a dozen times the same lines:

PHP Warning:  Module 'imagick' already loaded in Unknown on line 0
PHP Warning:  Module 'imagick' already loaded in Unknown on line 0
PHP Warning:  Module 'imagick' already loaded in Unknown on line 0
PHP Warning:  Module 'imagick' already loaded in Unknown on line 0

My question is in which configuration file this is set and how I can repair it.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

1 answer

This error does not mean that you have more than one copy of something installed. Instead it means that within the code you are running there are more than one require('imagick') lines. PHP will display this warning when you try to do a require() on something that has already been included earlier in the code. This can be corrected by either including the package only once or changing these lines to require_once which will not attempt to include it if it’s already been included.

Submit an Answer