{"id":7411,"date":"2021-06-20T07:04:06","date_gmt":"2021-06-19T22:04:06","guid":{"rendered":"https:\/\/www.stuffy.site\/computers\/?p=7411"},"modified":"2022-04-23T08:03:27","modified_gmt":"2022-04-22T23:03:27","slug":"wordpress%e3%81%aephp%e6%8b%a1%e5%bc%b5%e3%83%a2%e3%82%b8%e3%83%a5%e3%83%bc%e3%83%ab-imagick%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/www.stuffy.site\/computers\/archives\/7411","title":{"rendered":"WordPress\u306ePHP\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb imagick\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b"},"content":{"rendered":"\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2021\/06\/error_imagick.png\"><img decoding=\"async\" src=\"https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2021\/06\/error_imagick-1024x585.png\" alt=\"\" class=\"wp-image-7438\"\/><\/a><\/figure><\/div>\n\n\n\n<p>WordPress\u306e\u30b5\u30a4\u30c8\u30d8\u30eb\u30b9\u306e\u30b9\u30c6\u30fc\u30bf\u30b9\u3067<\/p>\n\n\n\n<p>\u300c\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u30e2\u30b8\u30e5\u30fc\u30eb imagick \u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u306a\u3044\u304b\u3001\u7121\u52b9\u5316\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u300d<\/p>\n\n\n\n<p>\u3068\u8868\u793a\u3055\u308c\u308b\u306e\u304c\u6c17\u6301\u3061\u60aa\u3044\u306e\u3067CentOS7\u306eBaseRepo \u304b\u3089ImageMagick\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307f\u307e\u3057\u305f\u304c\u3001phpinfo()\u306b imagick \u304c\u8868\u793a\u3055\u308c\u306a\u304f\u3066\u3053\u30531\u304b\u6708\u307b\u3069\u60a9\u3093\u3067\u3044\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>BaseRepo\u304b\u3089ImageMagick\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068\u30d0\u30fc\u30b8\u30e7\u30f3\u3068\u304b\u4f9d\u5b58\u95a2\u4fc2\u304c\u826f\u304f\u306a\u3044\u3089\u3057\u3044\u304b\u3063\u305f\u306e\u3067\u63a2\u7d22\u3092\u7d9a\u3051\u308b\u3068\u4ee5\u4e0b\u306e\u30d6\u30ed\u30b0\u3092\u767a\u898b\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/qiita.com\/h1na\/items\/3c60277f431377ebe06a\">CentOS\u3067PHP\u306eImageMagick\u30e9\u30c3\u30d1\u30fc\u30e9\u30a4\u30d6\u30e9\u30ea\u3001PECL::imagick\u3092\u5165\u308c\u3066WebP\u3067\u51fa\u529b\u3057\u3066\u307f\u308b<\/a><\/p>\n\n\n\n<p>\u65e9\u901f\u3001\u8a66\u3057\u305f\u3068\u3053\u308d\u826f\u3055\u305d\u3046\u3060\u3063\u305f\u306e\u3067\u30b7\u30a7\u30a2\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n<pre># <span style=\"color: #0000ff;\">yum install gcc php-devel pkgconfig php-pear<br><\/span>\nremi\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089ImageMagick, -devel,-perl\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br>\n# <span style=\"color: #0000ff;\">yum --enablerepo=remi install ImageMagick ImageMagick-devel ImageMagick-perl<br><br><\/span>imagick \u3092pecl\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br>\n# <span style=\"color: #0000ff;\">pecl install imagick<\/span><span style=\"color: #0000ff;\"><br><\/span>\n\/etc\/php.d\/40-imagick.ini \u3092\u65b0\u898f\u4f5c\u6210\u3001\u4ee5\u4e0b\u3092\u8ffd\u8a18<br>\n<span style=\"color: #0000ff;\">extension=imagick.so<br><\/span>\nphp-pecl-imagick\u3092remi-php74\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br>\n# <span style=\"color: #0000ff;\">yum --enablerepo=remi,remi-php74 install php-pecl-imagick<br><br><\/span>httpd, php-fpm\u518d\u8d77\u52d5<br>\n# <span style=\"color: #0000ff;\">systemctl restart httpd<br><\/span>\n# <span style=\"color: #0000ff;\">systemctl restart php-fpm<\/span><\/pre>\n<pre>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067phpinfo\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059<br><br># <span style=\"color: #0000ff;\">php -i | grep imagick<br><\/span>\n<span style=\"color: #ff0000;\">imagick<\/span>\n<span style=\"color: #ff0000;\">imagick<\/span> module =&gt; enabled\n<span style=\"color: #ff0000;\">imagick<\/span> module version =&gt; 3.4.4\n<span style=\"color: #ff0000;\">imagick<\/span> classes =&gt; Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel\n<span style=\"color: #ff0000;\">imagick<\/span>.locale_fix =&gt; 0 =&gt; 0\n<span style=\"color: #ff0000;\">imagick<\/span>.progress_monitor =&gt; 0 =&gt; 0\n<span style=\"color: #ff0000;\">imagick<\/span>.set_single_thread =&gt; 1 =&gt; 1\n<span style=\"color: #ff0000;\">imagick<\/span>.shutdown_sleep_count =&gt; 10 =&gt; 10\n<span style=\"color: #ff0000;\">imagick<\/span>.skip_version_check =&gt; 1 =&gt; 1<\/pre>\n<pre>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u306eImageMagick\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u78ba\u8a8d\u3057\u307e\u3059\u3002<br><br># <span style=\"color: #0000ff;\">yum list installed | grep ImageMagick<br><\/span>\n<span style=\"color: #ff0000;\">ImageMagick<\/span>.x86_64                    6.9.11.60-1.el7.remi           @remi\n<span style=\"color: #ff0000;\">ImageMagick<\/span>-devel.x86_64              6.9.11.60-1.el7.remi           @remi\n<span style=\"color: #ff0000;\">ImageMagick<\/span>-libs.x86_64               6.9.11.60-1.el7.remi           @remi\n<span style=\"color: #ff0000;\">ImageMagick<\/span>-perl.x86_64               6.9.11.60-1.el7.remi           @remi\n<span style=\"color: #ff0000;\">ImageMagick<\/span>6-libs.x86_64              6.9.12.15-1.el7.remi           @remi<\/pre>\n<p>\u30b5\u30a4\u30c8\u30d8\u30eb\u30b9\u3067\u30c1\u30a7\u30c3\u30af\u30af\u30ea\u30a2\u306e\u30b9\u30c6\u30fc\u30bf\u30b9\u78ba\u8a8d\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2021\/06\/imagck.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"604\" src=\"https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2021\/06\/imagck-1024x604.png\" alt=\"\" class=\"wp-image-7453\" srcset=\"https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2021\/06\/imagck-1024x604.png 1024w, https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2021\/06\/imagck-300x177.png 300w, https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2021\/06\/imagck-768x453.png 768w, https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2021\/06\/imagck.png 1061w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>WordPress\u306e\u30b5\u30a4\u30c8\u30d8\u30eb\u30b9\u306e\u30b9\u30c6\u30fc\u30bf\u30b9\u3067 \u300c\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u30e2\u30b8\u30e5\u30fc\u30eb imagick \u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u306a\u3044\u304b\u3001\u7121\u52b9\u5316\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u300d \u3068\u8868\u793a\u3055\u308c\u308b\u306e\u304c\u6c17\u6301\u3061\u60aa\u3044\u306e\u3067CentOS7\u306eBaseRepo \u304b\u3089Imag [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,35,4],"tags":[],"class_list":["post-7411","post","type-post","status-publish","format-standard","hentry","category-centos7","category-php","category-wordpress"],"_links":{"self":[{"href":"https:\/\/www.stuffy.site\/computers\/wp-json\/wp\/v2\/posts\/7411","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.stuffy.site\/computers\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.stuffy.site\/computers\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.stuffy.site\/computers\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.stuffy.site\/computers\/wp-json\/wp\/v2\/comments?post=7411"}],"version-history":[{"count":14,"href":"https:\/\/www.stuffy.site\/computers\/wp-json\/wp\/v2\/posts\/7411\/revisions"}],"predecessor-version":[{"id":8620,"href":"https:\/\/www.stuffy.site\/computers\/wp-json\/wp\/v2\/posts\/7411\/revisions\/8620"}],"wp:attachment":[{"href":"https:\/\/www.stuffy.site\/computers\/wp-json\/wp\/v2\/media?parent=7411"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.stuffy.site\/computers\/wp-json\/wp\/v2\/categories?post=7411"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.stuffy.site\/computers\/wp-json\/wp\/v2\/tags?post=7411"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}