1

I need help for a strange issue to me. I am developing an application in PHP with an IIS server (I don't decide, don't blame me lol) and when I try to upload more than 6 files I don't get any error but a request not found from the script that uploads the files.

"NetworkError: 404 Not Found - https://dev-server-host/admin/admin-manage-file-uploads.php?add=1&inst=GalleryPic&doctype=img"

I thought the issue was in the PHP configuration for file uploads, but I have checked the limits are quite generous:

max_execution_time = 600
max_input_time = 120
memory_limit = 2000M
post_max_size = 1000M
upload_max_filesize = 1000M
max_file_uploads = 5000

Is there any configuration am I missing from IIS side?

I don't have a Web.config(*) file for this project, should I set up a Web.config file with upload parameters definition?

(*) Correct me if I am wrong but I think this file is only needed for ASP applications, for PHP this file is not processed.

manou
  • 61
  • 7

1 Answers1

1

What I did to solve the issue has been:

  1. Open Request Filtering in the IIS section of my application
  2. Select the tab "Rules"
  3. Click on "Edit Feature Settings..." from the actions menu on the right
  4. Increase the value of "Maximum allowed content length"

Reference: http://www.web-site-scripts.com/knowledge-base/article/AA-00696/0/Increasing-maximum-allowed-size-for-uploads-on-IIS7.html

The equivalent way is to create the Web.config with the following content:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <security>
            <requestFiltering>
                <requestLimits maxAllowedContentLength="209715200" />
            </requestFiltering>
        </security>
    </system.webServer>
</configuration>

So apparently, even for PHP applications the Web.config file comes to play.

manou
  • 61
  • 7