[wp-trac] [WordPress Trac] #26918: Wordpress doesn't honor 'post_max_size = 0' in php.ini
WordPress Trac
noreply at wordpress.org
Thu Jan 23 21:40:16 UTC 2014
#26918: Wordpress doesn't honor 'post_max_size = 0' in php.ini
--------------------------+-----------------------------
Reporter: iisdev | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 3.8
Severity: normal | Keywords:
--------------------------+-----------------------------
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().
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26918>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list