Check inside your wp-config.php file and your .htaccess file, there’s a possibility that one of those 2 files may be interfering.
Thread Starter
Topher
(@topher1kenobe)
Nope, there’s nothing there.
I did some further checking:
I tried printing ini_get( ‘upload_max_filesize’) in various places, and it’s always right. I eventually found the function that calculates the sizes allowed, wp_max_upload_size.
In the top of that function I printed the ini options and they’re right. At the bottom of the function the total is calculated wrong. It’s doing
$bytes = apply_filters( 'upload_size_limit', min($u_bytes, $p_bytes), $u_bytes, $p_bytes );
Feeding in 10485760 for both $u_bytes and $p_bytes should come up with 10485760 at the other end as well, but it’s coming up with 1536000.
What’s going on here?
Try contacting your hosts for assistance.
Thread Starter
Topher
(@topher1kenobe)
They simply told me to make a custom php.ini file. 🙂 That’s done, and it works wonderfully. I’m wondering my WordPress isn’t doing the math right.
Thread Starter
Topher
(@topher1kenobe)
Inside wp_max_upload_size(), if I set $bytes = 10485760; it lets me upload a larger file, but then says HTTP Error in red at the top and never finished crunching, so something’s obviously really set wrong, rather than simply doing the math wrong. Is there another setting besides upload_max_filesize and post_max_size that has to be set for larger uploads?
Hmm… it’s possible that your host still has some other setting over-riding the upper limit of your php.ini file.
Thread Starter
Topher
(@topher1kenobe)
I don’t think it’s that because if I print the values of both variables in the same function that calculates the total they’re both large. So the php settings are right, something inside WordPress is eating them. 🙁
If you are in a wordpress multi site installation you‘ll have to change manually some values in site_meta table.
They are:
1. blog_upload_space – The amount of space a single blog has to upload files to
2. fileupload_maxk – The largest file that may be uploaded (I believe this is in bytes)
3. upload_filetypes – This restricts the MIME type that can be uploaded I believe through the Flash uploader
Many thanks to Sean
http://seanklein.org/2009/06/wordpress-php-upload-information/