WordPressは必須要件にもあるがPHPで動いている。そして、2025年6月現在はバージョン7.4以上とある。
レンタルサーバーは、PHPの各バージョン環境を用意しているだけでなく、設定ファイル:php.iniにてPHPプログラムの動作を制御している。
WordPressでは、php.iniの要件定義は敢えてしていないが、wp-config.phpに設定されている数値がphp.iniの内容と関係している。
とまあ、前置きはこれくらいにして、WPサイトでとある条件(プラグイン利用)で画像を挿入したときにWPのWarningエラーが表示されるという現象が発生した。下記エラーのパスは一部ダミー。
Warning: file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /xxx/www/xxxx/xxxx.com/xxxx/...../wp-includes/class-wp-image-editor-imagick.php on line 156
Warning: file_get_contents(https://sample.com/xxxx/...../wp-content/uploads/2024/11/sample.jpg): Failed to open stream: no suitable wrapper
could be found in /xxx/www/xxxx/xxxx.com/xxxx/...../wp-includes/class-wp-image-editor-imagick.php on line 156
続きを読む →