0
votes

I'm having a problem on a site that I manage where users can't upload files because the file attachments section doesn't show any inputs:

Broken prod environment

The exact same code on our dev environment works as expected, with pretty much the same database:

Working dev environment

I suspect that the problem has to do with file permissions or upload size restrictions, but I'm not sure.

Drupal documentation on this, and forums, are pretty sparse. Any ideas?


Edit: I'm seeing this error message in the status report. Maybe it's related?

Potentiall

3

3 Answers

0
votes

Check your configuration (file_uploads = On must be set to "On")

PHP configuration:

For file uploads to work, PHP must be configured properly. The following PHP configuration variables may need to be set or configured, in your PHP php.ini file, .htaccess file, or settings.php files.

file_uploads = On must be set to "On"
upload_max_filesize = 24M can't be larger than post_max_size
max_input_time = 300 small values may cause timeouts for large file uploads
memory_limit = 64M small values may cause out of memory errors for large file 
uploads
max_execution_time = 180 small values may cause timeouts for large file uploads
post_max_size = 24M limits the size of input submitted to the website (including 
attached files)
0
votes

In back-end go to Configuration -> Media -> File system and just hit "Save configuration" button without changing anything. If there is a problem with some path (not writable) it's field will get red outline.

0
votes

Thanks for all the help everyone. The answer to this problem was much simpler than I had expected--we just had to clear the Drupal cache. It was complicated by the fact that we didn't have full control over the production server, but once we cleared the cache from the browser everything was working again. Hope that helps anyone who runs into a similar situation.

Clearing the cache should be one of the first steps for addressing Drupal issues it seems! Should have thought of it earlier.