2
0

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 3 years have passed since last update.

php8 で WP Offload Media Lite を使うときのエラー解決方法 【Your server currently has no SimpleXML PHP module and no XMLWriter PHP module.】

Last updated at Posted at 2022-02-05

ワードプレスのプラグイン WP Offload Media Lite を有効化した際、下のエラーメッセージがでた。

mediaチャ.JPG

The official Amazon Web Services SDK requires PHP 5.5+ with SimpleXML and XMLWriter modules, and cURL 7.16.2+ compiled with OpenSSL and zlib. Your server currently has no SimpleXML PHP module and no XMLWriter PHP module.
You can deactivate the WP Offload Media Lite plugin to get rid of this notice.

SimpleXMLXMLWriterが無いのでインストールしてと言っている。

検証環境

  • PHP 8.0.13
  • Apache/2.4.52
  • サーバー EC2 Amazon Linux 2

解決した手順

php-xmlをインストールすれば、SimpleXMLXMLWriterを一度にインストールできるらしいので

sudo yum install -y php-xml

apacheを再起動する

$ sudo systemctl restart httpd.service

しかしメッセージは消えない。

SimpleXMLXMLWriterがインストールされているか確認する。

$ php -m

phpm.JPG

たしかにSimpleXMLXMLWriterはインストールされている。

php-fpmを再起動してみる。php-fpmはPHP標準のアプリケーションサーバのこと。

$ sudo systemctl restart php-fpm

phpnomessages.JPG

エラーメッセージが消えました!

その他

以前php7.2でWP Offload Media Liteを使ったときはApacheを再起動するところまででメッセージは消えた。php8.0~ではphp-fpmの再起動が必要なようだ。

参考:
[WordPress]WP Offload Media Liteを使うことができない
php-fpmについてざっくり紹介してみる

2
0
0

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
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?