WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 4 years ago

Last modified 4 years ago

#6735 closed defect (bug) (fixed)

File upload limit - error message

Reported by: simonwheatley Owned by:
Milestone: 2.9 Priority: normal
Severity: normal Version: 2.5
Component: Upload Keywords: needs-patch
Focuses: Cc:

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 6 years ago.
Amends upload filesize error to mention all relevant php.ini values
file_upload_move_error.patch (32 bytes) - added by simonwheatley 6 years ago.
Ooops, uploaded the wrong patch. See other.

Download all attachments as: .zip

Change History (13)

simonwheatley6 years ago

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

simonwheatley6 years ago

Ooops, uploaded the wrong patch. See other.

comment:1 Otto426 years ago

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

comment:2 ithinkihaveacat6 years ago

  • Cc mjs@… added

comment:3 ryan6 years ago

  • Milestone changed from 2.5.2 to 2.9

Milestone 2.5.2 deleted

comment:4 Denis-de-Bernardy5 years ago

  • Component changed from General to Upload
  • Owner anonymous deleted

comment:5 Denis-de-Bernardy5 years ago

  • Keywords needs-patch added; has-patch needs-testing removed

can't get the patch to apply

comment:6 ryan4 years ago

  • Milestone changed from 2.9 to Future Release

comment:7 Denis-de-Bernardy4 years ago

  • 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.

comment:8 nacin4 years ago

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

comment:9 dd324 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.

comment:10 nacin4 years ago

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

comment:11 hakre4 years ago

Related: #13575

Note: See TracTickets for help on using tickets.