Rick Hurst Web Developer in Bristol, UK


Maximum file upload size in Drupal

In a Drupal (5.something) site, there is a section in the admin for specifying how file uploads should be handled. As well as specifying the maximum file size allowed for a single upload it reports what the current php settings are e.g:-

“Your PHP settings limit the maximum file size per upload to 4 MB.”

This can be confusing! I just set the max_file_upload in my php.ini to 20MB and drupal was still reporting 4MB. After a bit of fishing around I found out there are two factors to this. First look for max_file_upload in your php.ini and check that that is set to something sensible, then search for post_max_size (also in php.ini) – it seems that drupal is reporting this value divided by 2