0

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

3

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

  • 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
  • What kind of files are these? Due to the post-upload processing that takes place on images, large image uploads sometimes fail, while comparable non-image uploads work fine. Could that be the problem? If so, its a php memory issue, rather than the uploader. – goldenapples Mar 29 '11 at 2:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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