Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#17314 closed defect (bug) (invalid)

Max file size upload restriction to 2Mb

Reported by: ivaseg's profile Ivaseg Owned by:
Milestone: Priority: normal
Severity: major Version: 3.1.1
Component: Upload Keywords: reporter-feedback
Focuses: Cc:


When I tried to upload files through media uploader I can see restriction to 2Mb max file size.

I've use IIS 7.5 (Windows Server 2008 R2 SP1 Web Edition) + PHP 5.2.17 FastCGI + MySql 5.0.51a and Wordpress 3.1.2 with Multisite based on sub-domains enabled.

Run <?php phpinfo(); ?> display me next:

upload_max_filesize	10M
post_max_size	10M

So, as we can see, we can upload files up to 10Mb but Wordpress still don't want to upload files more than 2Mb.

Ok, I'm going to check upload function through other PHP script. I've download this script and trying to upload file with size ~10Mb and it was successful, so I think this is strange bug in Wordpress.

PS: I use Wordpress 3.1.2 but in 3.1.1 this bug also exist. Also tested this bug with new blog without plugins and with default theme and it also exist.

Change History (7)

#1 follow-up: @filosofo
13 years ago

Duplicate of #13765 ?

#2 in reply to: ↑ 1 @Ivaseg
13 years ago

Replying to filosofo:

Duplicate of #13765 ?

Not. I've use just 0.1% of my space limit. The same situation affected by all other users.

#3 @dd32
13 years ago

  • Keywords reporter-feedback added

Can you run this code at all for me?

ini_get( 'upload_max_filesize' ),
wp_convert_hr_to_bytes( ini_get( 'upload_max_filesize' ) ),
ini_get( 'post_max_size' ),
wp_convert_hr_to_bytes( ini_get( 'post_max_size' ) )
apply_filters( 'upload_size_limit', '10M')

You'll need to run it in an admin context, So either via the Debug Bar plugin with the Debug Bar Console plugin installed as well, or you might be able to do include (ABSPATH . 'wp-admin/includes/template.php'); if you're running the code on the front end.

#4 @dd32
13 years ago

Also, I'm not sure where it's set in Multisite, but check the value of this:

get_site_option( 'fileupload_maxk' );

It defaults to 1.5MB, which thanks to rounding, is probably what you're seeing.

#5 @Ivaseg
13 years ago

  • Resolution set to fixed
  • Status changed from new to closed

I was install both plugins Debug Bar and Debug Bar Console + enable debug mode in WP config but I can't find where I can run your code in admin area.

Today I saw file upload size limit 9M in media uploader, so it work now. I don't know what it was, may be cache. Sorry for the trouble.

#6 @dd32
13 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

#7 @dd32
13 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.