Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#26918 closed defect (bug) (duplicate)

Wordpress doesn't honor 'post_max_size = 0' in php.ini

Reported by: iisdev's profile iisdev Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.8
Component: Media Keywords:
Focuses: Cc:


Directly from 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.

If the users opts to disable the limit with:

post_max_size = 0

they receive the following message upon loading the 'Insert Media' page:

"Maximum upload file size: 0KB."

Any attempt to upload FAILS, regardless if the user has correctly configured the remaining settings and file system permissions.

Wordpress SHOULD NOT ASSUME the value '0' is a unit of measurement unless it's followed by a unit of measurement (KB,MB, etc..). For example: the current behavior would be correct if the value was '0KB' but NOT if it's just '0' BECAUSE is a valid boolean value for post_max_size indicating that it should be disabled.

"Maximum upload file size: 0KB." and the errors that appear with any upload attempt are misleading and useless to the user. They are several posts on the support forums where their php.ini settings and file permissions are correct but the upload just doesn't work. This bug is probably the cause.

Wordpress needs to better communicate to the user that it doesn't honor a value for post_max_size in php.ini unless it's accompanied by a unit of measurement. A Warning message with similar wording is all that is needed on the 'Insert Media' page if you don't want to spend the time fixing wp_max_upload_size().

Change History (1)

#1 @SergeyBiryukov
11 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #23895.

Note: See TracTickets for help on using tickets.