Symptoms
When trying to enable the Imagick PHP extension for alt-php## in a Cloudlinux environment either from the cPanel > Software > Select PHP Version > Extensions interface or using the command line, you are faced with the following error: (Here we use the command line)
/usr/bin/selectorctl --enable-user-extensions=imagick --version=$VERSION_NUM --user=$USER_NAME
WARN:imagick skipped as conflicting
Note: You must replace $VERSION_NUM with the PHP version and $USER_NAME with the user for whom you wish to enable the Imagick extension.
Description
This usually means that there is at least one conflicting PHP extension already enabled for the user. The extension in this particular case is the Gmagick PHP extension. Imagick and Gmagick cannot really co-exist in the same environment as some of the symbols are similar. You can confirm if the Gmagick extension exists for the user by running this command:
/usr/bin/selectorctl --list-user-extensions --version=$VERSION_NUM --user=$USER_NAME | grep -i magick
gmagick
Workaround
The solution is to first disable Gmagick and then enable Imagick using these commands:
/usr/bin/selectorctl --disable-user-extensions=gmagick --version=$VERSION_NUM --user=$USER_NAME
/usr/bin/selectorctl --enable-user-extensions=imagick --version=$VERSION_NUM --user=$USER_NAME
Comments
0 comments
Article is closed for comments.