11
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Wordpressで「画像を切り抜く際にエラーが発生しました。」が出る問題(PHP5.5)

Last updated at Posted at 2014-08-02

環境

  • CentOS 6.5
  • PHP 5.5
  • Wordpress 3.9.1

症状

Wordpressをインストールしてみたところ、ぱっと見は動いているが画像の切り抜きに失敗する。

wordpress_error.png

エラーメッセージ

日本語

「画像を切り抜く際にエラーが発生しました。」

英語

「There has been an error cropping your image.」

原因

php-gdがないため、エラーと判断されている。
ソースコードは以下の場所。ちなみにデバッグログなど出してくれない。

class-wp-image-editor-gd.php
// public static function test
if ( ! extension_loaded('gd') || ! function_exists('gd_info') )
	return false;

解決策

PHP5.5にphp-gdをインストールした。

# gd-lastをアップデート
sudo yum install --enablerepo=remi gd-last
# php-gdをインストール
sudo yum install --enablerepo=remi-php55 php-gd

解決!!

参考にしたサイト

11
11
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?