This topic is locked
[SOLVED]

  Large files Upload

1/24/2012 1:42:03 AM
PHPRunner General questions
H
hernanccs author

Hi guys

im having problems uploading large files (25MB or more) using my phprunner 6 generated application. Long time ago i had this problem uploading files larger than 2MB so i changed the value for following variables in my php.ini
post_max_size=1024M

memory_limit=512M

max_execution_time=9000

upload_max_filesize=1024M
After changing those settings i was able to upload files larger than 2MB; now i need to upload some files larger than 25MB and everytime i try to upload them i receive this error (looks like IIS screen not PHP error screen)
Server Error

404 - File or directory not found.

The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
I'm using IIS 7.5.760016385 on a Windows Server 2008 R2 and PHP 5.3.5
any suggestions?
thanks

C
cgphp 1/24/2012
H
hernanccs author 1/24/2012

OK, my question had part of the answer...



everytime i try to upload them i receive this error (looks like IIS screen not PHP error screen)
Server Error

404 - File or directory not found.

The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.


The error was actually IIS configuration. By default IIS 7.5 on Windows Server 2008 R2 has a restriction of 30000000 bytes, thats why i wasnd able to upload files larges than ~25MB
To solve this problem i had to open the Internet Information Server Manager, go to the website, open the Configuration Editor, and look for this section on the list that is on top system.webServer/security/requestFiltering then click on requestLimits to display a list of variable where maxAllowedContentLenght if found and change it to some higher value ( i set it at 10000000000)
Hopefully this will help others solve this problem

H
hernanccs author 1/24/2012



Check if this can help you: http://www.itexperience.net/cannot-upload-large-files-to-iis7-website/


Guess thats another way to solve the problem, and there is one more using a script to automatically mod the value of the variable
found this on google groups web

"If you are uploading large file through IIS 7, it will return error
HTTP Error 404.13 - Not Found

The request filtering module is configured to deny a request that

exceeds the request content length.
In order to avoid this error, try to set maxAllowedContentLength

value as
i: create new .bat file

ii: paste code shown below
%windir%\system32\inetsrv\appcmd unlock config "[websitename]" -

section:system.webServer/security/requestFiltering

%windir%\system32\inetsrv\appcmd set config "[websitename" -

section:requestFiltering -requestLimits.maxAllowedContentLength:

200000000 -commitpath:apphost

PAUSE
iii: websitename will be application name e.g Default Web Site/

sampleproject

iv: run .bat file with administrative previliges.
This will set maxAllowedContentLength for specified website /

application. "