Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

No Longer Able to Upload Files

Solved by Justin Young View solution

Started by Justin Young 6 years ago · 7 replies · 821 views
6 years ago

After updating the Form plugin to v4.0.2 (and Email plugin to v3.0.5 and Grav to 1.6.2), I am no longer able to upload files larger than ~500kb via the GUI.

The Max Filesize on Plugin: Form is set to use the system default (which is 64M). However, even changing the Max Filesize doesn't allow larger files.

Everything was working prior the updates.

Any suggestions how to troubleshoot?

Here is how to error appears (larger image on left):

Screen Shot 2020-02-06 at 7.26.54 AM|690x313

last edited 02/06/20 by Justin Young
6 years ago

Update: I tested uploading files on backup copies of my site (prior to updating Form, Email, and Grav) – and got a similar error:

Screen Shot 2020-02-06 at 8.02.58 AM|331x235

Thus, it looks like the issue is with the server and not the updates.

Any thoughts on where to start diagnosing this?

6 years ago

The failing image has a whitespace in its filename. Please rename and retry.
If that fails too, have a look in the server's log files.

6 years ago

Thank you.

Renaming still fails.

Which specific server logs should I look at?

6 years ago

That depends on your server. Common locations are

TXT
/var/log/apache2/error.log
/var/log/php.errors
6 years ago Solution

Thanks again – I think I figured it out.

I found a lot of errors; here are two sample errors:

[Thu Feb 06 03:13:02.541067 2020] [:error] [pid 31022] [client 54.293.245.176:52154] [client 54.293.245.176] ModSecurity: Multipart parsing error: Multipart: Failed to create file: /run/shm/modsec_tmp/20200206-031302-Xjv0voaG08yn1@JgY5rB3wAAAAk-file-eNLcVn [hostname "www.example.com"] [uri "/admin/media/home/_thinking.json/task:addmedia"] [unique_id "Xjv0voaG08yn1@JgY5rB3wAAAAk"], referer: https://www.example.com/admin/pages/home/_thinking

[Thu Feb 06 03:13:02.545312 2020] [:error] [pid 31022] [client 54.293.245.176:52154] [client 54.293.245.176] ModSecurity: Input filter: Failed to create temporary file: /run/shm/modsec_tmp/20200206-031302-Xjv0voaG08yn1@JgY5rB3wAAAAk-request_body-h1mUBZ [hostname "www.example.com"] [uri "/admin/media/home/_thinking.json/task:addmedia"] [unique_id "Xjv0voaG08yn1@JgY5rB3wAAAAk"], referer: https://www.example.com/admin/pages/home/_thinking

After researching mod_security, I tried turning off the "Extra Web Security" feature on Dreamhost and it worked.

Thank you!

6 years ago

ps – Dreamhost responded and said their mod_security was misconfigured. They fixed it and everything works – even with mod_security enabled.

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
2 56 13 hours ago
Support · by Anna, 3 days ago
2 61 16 hours ago
Support · by Justin Young, 17 hours ago
1 32 17 hours ago
Support · by Duc , 1 week ago
2 66 5 days ago
Support · by Colin Hume, 1 week ago
2 59 5 days ago