When I try to upload a file greater than about 2MB, using the IMCE module, it tells me that "No files were uploaded".

The problem happens when uploading images (e.g., .gif) and documents (e.g., .pdf). I can only upload these files successfully if they are less than about 2 MB in size.

I had been using IMCE successfully for some time, but hadn't ever tried to upload a document this big in the past.

Things I have tried:

  • I have tried using FTP to upload large files to the server on which the website is hosted. This works fine, so I assume it is not a problem with space on the server.
  • I have changed the settings on the admin >> settings >> imce tab. I tried removing all size limitations or increasing the size limations, as well as checking and unchecking the "image resize" box. There may be configurations I haven't tried here though.
  • I have tried uploading the files as both an administrator and a restricted user.
  • I have tried uploading different types of files. The problem appears to happen with all file types, including images (e.g., .gif) and documents (e.g., .pdf). I can only upload these files successfully if they are less than about 2 MB in size.
  • I have searched the forums for answers to this problem. I found slightly similar posts (e.g, http://drupal.org/node/92852), but none with this particular problem.

My website is running on:

  • Drupal 4.7

Thanks for your help,

...
Kevin.

Comments

ufku’s picture

hi kevin,
it is probably due to upload limit of php. there is the "upload_max_filesize" parameter in php.ini file causing this restriction. you should set it to a higher value manually or use ini_set in your settings.php.
ex: ini_set("upload_max_filesize", "5M");// set upload limit to 5 Mb
some hosting providers allow to use php.ini files in web root. you can try it by creating a php.ini having a single line that is upload_max_filesize = 5M

transformative’s picture

Thank you so much for your quick response!

I was able to get it working, because of your suggestions.

I wasn't able to do it in the settings.php file, though. Instead I had to add it to the .htaccess, to get it working properly. I found instructions here (http://drupal.org/node/19326) that worked for me:

Under shared hosting and kept hitting the 2M wall. I also had no luck w/settings.php, but then I read that you can't set upload_max_filesize or post_max_size at runtime, so, from the instructions in another post, I set those in .htaccess in bytes , and everything works great! This is set to 15 meg(ish):
php_value upload_max_filesize 15000000<br /> php_value post_max_size 15000000

I didn't know where to start looking, to fix this problem, until I got your message... so I really appreciate the help.

Thanks again,

...
Kevin.

edrex’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)
mvpfi’s picture

I also had to increase memory_limit to 128M. Uploading was ok, but when ICME started to resize big images, it crashed. Older PHP 5 settings like mine had default memory limit on 32M, which is not enough for big pictures.