Search code examples
phpimagick

imagick not shown in phpinfo


I have imagick installed in my webserver. And when I do a php -m | grep imagick, I do see that it's there:

[root@uszwslp00031la ~]# php -m | grep imagick
imagick

However when I look in the phpinfo page for the server, I don't see that imagick is loaded. So does that mean that imagick is not actually working, even tho I see it on the command line?

I have the extension loaded in my php.ini file:

[root@uszwslp00031la ~]# php -i | grep php.ini
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php.ini

 [root@uszwslp00031la ~]# grep imagick.so /etc/php.ini
extension = imagick.so

And the extension file is loaded in the right extension directory:

[root@uszwslp00031la ~]# php -i | grep extension_dir
extension_dir => /opt/php/lib/php/extensions/no-debug-zts-20131226 => /opt/php/lib/php/extensions/no-debug-zts-20131226

[root@uszwslp00031la ~]# ls -l /opt/php/lib/php/extensions/no-debug-zts-20131226/imagick.so
-rwxr-xr-x. 1 root root 1154336 Jun 28 20:07 /opt/php/lib/php/extensions/no-debug-zts-20131226/imagick.so

So like I asked, is this working or not? How can I be sure. And if need to get the imagick extension to show up in the phpinfo page, how I can do that?

Thanks


Solution

  • Just my two cents, after couple of hours of banging my head against the server (Amazon Linux 2)... I had installed imagick:

    sudo yum install php-imagick
    

    And restarted apache:

    sudo systemctl restart httpd
    

    But the phpinfo still would not list the module...

    What I had to do to get the ball rolling:

    sudo systemctl restart php-fpm