0

I set up private file directory at /var/www/private to keep upload files from webform and setup permission on directory and files (664 for files, 775 for directories). When I click on upload button and select file, it throw an exception -
"An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (32 MB) that this server supports."

Solution is running on Drupal 8.3 on VM (Vagrant). Below is screen capture of error message

Upload file error message

Appreciate if you have an answer of this bug

1 Answer 1

0

This is not particular to the Drupal site but is caused by the hosting (local Vagrant) environment's PHP configuration.

Try increasing these values in php.ini:

upload_max_filesize = 64M 
post_max_size = 64M 
memory_limit = 64M

NOTE: If you are using Webform for anonymous file upload to your site and you are setting high limits on file size like this you are quickly going to fill up a lot of disk space (most likely with spam).

NOTE: After modifying php.ini file(s), you need to restart your HTTP server to use new configuration

See answer on Stackoverflow.

5
  • After resize post_max_size = 64M, its throw same exception. The values in php.ini: memory_limit = 192M, upload_max_filesize = 64M, and post_max_size = 64. Any suggestion ?
    – Bhagi
    Commented Sep 26, 2017 at 15:50
  • Now I got this error "An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (64 MB) that this server supports." I select few kilobyte size of file but showing exceeded 64 MB. There must be a bug on webform. When I navigate private directory 'var/www/private' I saw there are subfolders created by application 'var/www/private/webform/formname/_sid_/. I wonder whats made exceeded 64 MB when the file size is just few kilobytes. Appreciate if you share your experience. Thank you
    – Bhagi
    Commented Sep 26, 2017 at 16:05
  • @Bhagi have you resolved this problem? I'm in the same situation
    – MiharbKH
    Commented Oct 15, 2018 at 8:25
  • Same issue with me Commented Feb 25, 2020 at 13:49
  • If you have restarted your webserver the new values should load, but some hosts limit access to changing these settings. Try confirming that your changes have "taken" by getting the output of ini_get ('upload_max_filesize') and the others.
    – Duncanmoo
    Commented Feb 25, 2020 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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