User8472

Member
Apr 24, 2018
7
1
3
US
cPanel Access Level
Root Administrator
Hi,
I've got a perl script I've been using for years for file uploads and it has been working great. Had a customer use it last week. Now I'm getting the following error (script hasn't been changed):

Precondition Failed

The precondition on the request for the URL /upload/file-upload.cgi evaluated to false.

Additionally, a 412 Precondition Failed error was encountered while trying to use an ErrorDocument to handle the request.
--------------------

After doing some investigating, it seems that Apache doesn't want to accept a form input type of "file". Any test form that has a "file" input type is getting the above error. It's accepting regular "text" input types in forms with no issue.

Any ideas what's happening/where I can look to fix this?

Thanks in advance!
 

User8472

Member
Apr 24, 2018
7
1
3
US
cPanel Access Level
Root Administrator
Just a quick update. When this error occurs the script isn't executed. I can run the script directly with no errors (in this case it doesn't really do anything since it's not getting inputs from a form). Only when the script is called via the submission of a form with a "file" input type the error happens.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
Hello @User8472,

Can you check if your Mod_Security rules are blocking requests to that script? You can review recent ModSecurity hits via WHM >> ModSecurity Tools.

Thank you.