WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#17314 closed defect (bug) (invalid)

Max file size upload restriction to 2Mb

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

Description

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)

comment:1 follow-up: filosofo3 years ago

Duplicate of #13765 ?

comment:2 in reply to: ↑ 1 Ivaseg3 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.

comment:3 dd323 years ago

  • Keywords reporter-feedback added

Can you run this code at all for me?

var_dump(
wp_max_upload_size(),
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.

comment:4 dd323 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.

comment:5 Ivaseg3 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.

comment:6 dd323 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:7 dd323 years ago

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