Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ファイルアップロードを利用しているフォームで、大きめ(20MB以上等)の画像(orなにかのファイル)をアップロードして「入力内容を確認する」ボタンを押すと、真っ白のページになる #1011

Closed
tnagatomi opened this issue Apr 29, 2019 · 0 comments
Labels
Bug バグ

Comments

@tnagatomi
Copy link
Contributor

(このIssueはRedmineのチケットから移行されています)

作成者: 渕上 将和
作成日: 2019/03/19 10:22

h3. 現象、再現方法

・ファイルアップロードを利用しているフォームで、大きめ(20MB以上等)の画像(orなにかのファイル)をアップロードして「入力内容を確認する」ボタンを押すと、入力値がクリアされてフォームのindexに戻ってくる

h3. 調査した問題点

・phpのpost_max_sizeを超えると、php側ではPOSTデータを空のもの(サイズ 0)として処理する動作となる
 → 入力した値が全て空となってしまい、入力した値も消え、入力チェックエラーも表示されない状態となり、フォームを初めてブラウザで表示した動作のようになる
※調査文献: http://php.net/manual/ja/ini.core.php#ini.post-max-size
 「POSTデータの大きさが、post_max_sizeより大きい場合、 $_POST と $_FILES superglobals は空になります。」の箇所

h3. 対策案

・アップロードしたサイズのエラーを入力ユーザーに示し、大きすぎるサイズの際には案内を示すこと

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug バグ
Projects
None yet
Development

No branches or pull requests

2 participants