Make WordPress Core

Opened 16 years ago

Closed 15 years ago

Last modified 14 years ago

#6735 closed defect (bug) (fixed)

File upload limit - error message

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

Download all attachments as: .zip

Change History (13)

@simonwheatley
16 years ago

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

@simonwheatley
16 years ago

Ooops, uploaded the wrong patch. See other.

#1 @Otto42
16 years ago

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

#2 @ithinkihaveacat
16 years ago

  • Cc mjs@… added

#3 @ryan
16 years ago

  • Milestone changed from 2.5.2 to 2.9

Milestone 2.5.2 deleted

#4 @Denis-de-Bernardy
15 years ago

  • Component changed from General to Upload
  • Owner anonymous deleted

#5 @Denis-de-Bernardy
15 years ago

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

can't get the patch to apply

#6 @ryan
15 years ago

  • Milestone changed from 2.9 to Future Release

#7 @Denis-de-Bernardy
15 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.

#8 @nacin
14 years ago

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

#9 @dd32
14 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.

#10 @nacin
14 years ago

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

#11 @hakre
14 years ago

Related: #13575

Note: See TracTickets for help on using tickets.