Common FileField Problems and Solutions
This page contains a list of common problems and solutions when using FileField. If you experience a problem that is not listed here, do not post a comment. Post an issue to the FileField issue queue.
- I set the maximum upload size to X MB, but I can still only upload 2 MB files. See Increase the file upload size.
- When the field is set to "Unlimited" values, I'm only able to upload exactly 21, 25, or some other number of images. See Increase the number of allowed files.
Increase the file upload size
This question has an entire handbook page. See the Increase Maximum File Size page.
Increase the number of allowed files
This problem generally has two solutions. If you can upload exactly 21 images, this is probably because of bug in the CCK "Add another field" button. Upgrade to CCK 2.2 (Drupal 6) or higher where this problem is fixed.
If you're limited at any other number (25 seems to be common), then you are probably being limited by a PHP security extension called Suhosin. You can confirm if your server has Suhosin installed by visiting the path admin/reports/status/php within your Drupal site, or you can make an empty php file with the phpinfo() function. If there is a Suhosin section in the report, this is almost definitely the problem.
To fix this problem, find your php.ini file (usually in /etc/php.ini) and change the following values:
suhosin.post.max_vars = 200000
suhosin.request.max_vars = 20000
suhosin.post.max_value_length = 265000
suhosin.request.max_value_length = 265000
suhosin.upload.max_uploads = 100You may want to increase some of these values further if the new limit does not let you upload the desired number of files. After changing this value, you must restart Apache for them to take effect.
You might also be able to set these values using an .htaccess file. See the handbook page on increasing the maximum file upload size for examples on how to do this.
