I am using phpUploader on IIS8.5. I have the php upload set to 20mb and I have the site set to:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="30000001" />
</requestFiltering>
</security>
</system.webServer>
</configuration>
I tried to upload a file larger than allowed, approx 50mb, and instead of php grabbing it, IIS gave me an error.
Here is the check in the phpUploader.php:
// Max size PER file in KB
$max_file_size="20000";
// Max size for all files COMBINED in KB
$max_combined_size="80000";
//Check the size of each file
} Elseif($_FILES['file']['size'][$i] > ($max_file_size*1024)) {
$error.= "<b>FAILED:</b> ".$_FILES['file']['name'][$i]." <b>REASON:</b> File to large.<br />";
I have this set in php.ini:
upload_max_filesize = 100M
How do I prevent IIS from erroring out before php gets to it to verify the file size?