ヘルプ:PHP 8.1 からImageMagickを使う(AlmaLinux9)
提供:EELの自由帳
メインページ > ヘルプ:目次 > ヘルプ:自宅サーバー構築(AlmaLinux9) > PHP 8.1 からImageMagickを使う(AlmaLinux9)
- 自宅サーバーで、動作しませんでした。後日解決方法を探します。
PHPでImagickを使えるようにする
[root@host2 ~]# dnf --enablerepo=epel install ImageMagick [root@host2 ~]# dnf --enablerepo=epel install ImageMagick-devel [root@host2 ~]# dnf install php-devel ← peclでphpizeが使えなかったため [root@host2 ~]# dnf --enablerepo=epel install ImageMagick-perl ← PerlMagickのインストール [root@host2 ~]# pecl install imagick configuration option "php_ini" is not set to php.ini location You should add "extension=imagick.so" to php.ini [root@host2 ~]# find / -name imagick.so /usr/lib64/php/modules/imagick.so [root@host2 ~]# vi /etc/php.d/imagick.ini ; Enable imagick extension module extension=imagick.so
php-fpmの再起動
[root@host2 ~]# systemctl restart php-fpm
Webサーバー再起動
[root@host2 ~]# systemctl restart httpd