Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a strange upload problem similar to: wordpress upload http error?

I have an 8MB upload limit and no control of the php.ini.

My client can upload small media files (images and PDFs) successfully in Wordpress, but can't upload files larger than about 1MB. She has tried both the flash and browser upload methods, resulting in an IO error with the flash method and a 'Connect to the Server was reset while the page was loading' error with the browser method. She has tried on various browsers on two different computers.

However, from a different location I can upload exactly the same larger files, using the same Wordpress Login.

I created a simple php upload script (on the same site, but outside of WP) and she can successfully upload the larger files which fail in WP using that.

I can make a workaround where she uploads them using my form but it's not ideal as she's already finding wordpress quite complicated.

Any ideas why this could be happening?

THanks,

Lucy

share|improve this question

1 Answer 1

I'd suggest asking your client what value is shown when adding media, as shown here in the screenshot.

enter image description here

If the value shown is 1mb then i can tell you the function responsible is the following.

function wp_max_upload_size() {
    $u_bytes = wp_convert_hr_to_bytes( ini_get( 'upload_max_filesize' ) );
    $p_bytes = wp_convert_hr_to_bytes( ini_get( 'post_max_size' ) );
    $bytes = apply_filters( 'upload_size_limit', min($u_bytes, $p_bytes), $u_bytes, $p_bytes );
    return $bytes;
}

Found in wp-admin/includes/template.php
http://core.trac.wordpress.org/browser/tags/3.0.4/wp-admin/includes/template.php#L2712

As you can see from the above function, the value is first determined by the server ini configuration and secondly by any filters hooked onto upload_size_limit. If the server configuration is not matching what you see displayed, then my guess would be a plugin/theme adding a filter onto upload_size_limit which is imposing a different file size limit.

Additional
Some support topics that mention a similar problem.
http://wordpress.org/support/topic/upload-limit-problems-on-local-site
http://wordpress.org/support/topic/multiple-domain-mod-limits-file-uploads-to-1mb
http://wordpress.org/support/topic/max-upload-size-problem-yes-again

share|improve this answer
    
Thanks, the value is showing as 8MB for her. –  Lucy Jan 26 '11 at 14:53
    
The strange issue is that I can upload the files using exactly the same login. It makes me think it's something to do with her browser security or internet connection. But she can upload using the PHP upload form, so it must also be something to do with wordpress? Confused. –  Lucy Jan 26 '11 at 14:54
    
Has she tried another browser? Just to rule that out(since you mentioned it working when you've logged into that account yourself). –  t31os Jan 26 '11 at 14:55
    
Yes, she's tried various different browsers and two different computers (from the same location). –  Lucy Jan 26 '11 at 14:57
    
Dug up some similar sounding support requests, see the additional links i've added above, and see if there's anything there that might correspond to your clients issue. –  t31os Jan 26 '11 at 18:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.