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

AmazonLinux2023でPHPの設定を変更した際の読み込みに関して

Posted at

概要

PHP8.4をインストールしたEC2にてWordPressでテーマをインストールしようとした際に

辿ったリンクは期限が切れています。

もう一度お試しください。

と出てしまい、テーマがアップロードできなかった。
サイズが20MB以上あり、デフォルトが8MBなので容量の問題かと思いphp.iniを編集

php.ini
; Maximum size of POST data that PHP will accept.
; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enable_post_data_reading.
; https://php.net/post-max-size
post_max_size = 64M # 8MBから64MBに変更
コマンド
sudo systemctl restart httpd

これでphp.iniが読み込まれたと思い再度テーマをアップロードすると同様のエラーが。
phpinfoからpost_max_sizeを確認すると8MBのまま。

結論はapacheの再起動ではなく、php側の再読み込みが必要

コマンド
sudo systemctl restart php-fpm

php-fpmの再起動を行うと64MBに変更確認。apacheを再起動するのは昔のくせなので直さねば。

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