Opened 5 years ago

Closed 3 years ago

Last modified 3 years ago

#6735 closed defect (bug) (fixed)

File upload limit - error message

Reported by: simonwheatley Owned by:
Priority: normal Milestone: 2.9
Component: Upload Version: 2.5
Severity: normal Keywords: needs-patch
Cc: simon@…, mjs@…

Description

To reproduce:

  1. In php.ini, set post_max_size to something very low (e.g. 1K)
  1. Restart Apache
  1. Create a new post, and upload a file of over 1Kb.
  1. The error message makes mention of upload_max_filesize, but not post_max_size.

The attached patch amends the error message to mention both php.ini values (post_max_size & upload_max_filesize).

There are implications for localisation with this patch, in that it changes a localised string.

Attachments (2)

upload_php_ini_error.patch (1000 bytes) - added by simonwheatley 5 years ago.
Amends upload filesize error to mention all relevant php.ini values
file_upload_move_error.patch (32 bytes) - added by simonwheatley 5 years ago.
Ooops, uploaded the wrong patch. See other.

Download all attachments as: .zip

Change History (13)

Amends upload filesize error to mention all relevant php.ini values

Ooops, uploaded the wrong patch. See other.

Examples of this confusing people:
http://wordpress.org/support/topic/165353

  • Cc mjs@… added

comment:3   ryan5 years ago

  • Milestone changed from 2.5.2 to 2.9

Milestone 2.5.2 deleted

  • Component changed from General to Upload
  • Owner anonymous deleted
  • Keywords needs-patch added; has-patch needs-testing removed

can't get the patch to apply

comment:6   ryan3 years ago

  • Milestone changed from 2.9 to Future Release
  • Milestone changed from Future Release to 2.9
  • Resolution set to fixed
  • Status changed from new to closed

I'm pretty sure this was fixed by DD32's patch related to the file upload error messages a few months back.

Yes, it was addressed in #10495. But the committed changes make no explicit mention of "php.ini" or either setting. Should it?

comment:9   dd323 years ago

But the committed changes make no explicit mention of "php.ini" or either setting. Should it?

In my opinion, No. there are 2 sets of people who'll encounter this issue:

  • Shared hosting users - They have to contact their host regardless.
  • Dedicated setups
    • End user using it - Server configuration, contact the sys admin
    • Sys admin - Should understand that they need to edit their php.ini file

What i'm saying, Is that, In my opinion, its not worth confusing some users who cant find their php.ini file as they dont have access to it, and instead just refer to it as a server config error.. If a Sys admin comes accross it, They should already know they need to setup PHP correctly.

..And if all else fails, Googling the error will bring up a least 1 support forum thread on it at some point.

Makes sense to me, I completely agree. Just wanted to cross-reference the older ticket and confirm the behavior.

Related: #13575

Note: See TracTickets for help on using tickets.