I have some code which is resizing images, using either Imagick or GD, depending what's available on the server.
I'm testing for availability of each using the extension_loaded()
function.
if (extension_loaded('imagick')) {
$image = new Imagick();
...
}
I have one user reporting that they are receiving:
Fatal error: Class 'Imagick' not found
What circumstances would result in the Imagick extension being loaded but the class not available? How should I be testing to make my code more robust?