[nycphp-talk] IIS 7, trigger_error, and Large File Uploads
Hans Zaunere
lists at zaunere.com
Sun Jan 3 19:03:58 EST 2010
> > Oh my :)
>
> That applies to IIS, right? I just have to ask the question: can't you
just
> use a real web server that actually works, like, let's say, Apache? I
'work'
> with IIS at work and it is a totally dysfunctional kludge.
We're actually porting away from Apache to meet various requirements.
> > 2. I need to handle 200mb+ file uploads. I'm aware of the all the
caveats
> > to this, and have set what I've thought to be appropriate limits in
php.ini.
> > I'm apparently hitting some other timeout/limit from IIS 7, though.
After
> > roughly 60 seconds, I get a server 404 message. I've done some research
and
> > have seen this error comes up with ASP developers, and so I don't think
I'm
> > hitting a PHP limit/timeout (yet). I've looked at IIS setting
> > MaxAllowedContentLength, but it's default value is apparently at 2gb.
Any
> > thoughts on how a resolution, or at least how to debug what limit is
getting
> > hit?
>
> Well, circumventing an issue is also a valid approach. Does the upload
have to
> happen via HTTP? Maybe uploading via FTP to the same box (or one on the
same
> local network) may be a workaround. The script can then later 'upload'
from
> that local resource or directly access the file, which should bring the
final
> upload process close to local file copy speed. Using HTTP for uploading
files
> of that size is very inefficient, but may be convenient.
I'm aware of other/better approaches, but unfortunately I have to play the
hand I've been dealt for now.
> I did search around a bit and came across one comment in the PHP manual
> dealing with IIS having PHP installed as CGI. It is a bit older, but may
still
> apply, load http://us2.php.net/features.file-upload and go to the comment
from
> 2003-March-09...or just keep reading here, I copied verbatim:
>
> This took me a few days to find out: when uploading large files with a
slow
> connection to my WIN2K/IIS5/PHP4 server the POST form kept timing out at
> exactly 5 minutes. All PHP.INI settings were large enough to accomodate
huge
> file uploads. Searched like hell with keywords like "file upload php
timeout
> script" until I realised that I installed PHP as CGI and added that as a
> keyword. This was the solution:
>
> To set the timeout value:
> 1. In the Internet Information Services snap-in, select the computer icon
and
> open its property sheets.
> 2. Under Master Properties, select WWW Service, and then click the Edit
button
> 3. Click the Home Directory tab.
> 4. Click the Configuration button.
> 5. Click the Process Options tab, and then type the timeout period in the
CGI
> Script Timeout box.
Saw this one, too - somehow my control panel doesn't look like this guy's.
But, as far as I can tell, the FastCGI timeout is set to 600 seconds, which
is far greater than the roughly 60 second timeout I'm seeing. Now I
wouldn't bet the farm that that timeout is actually the one he's referring
to, or that it's active for my "site", but I'm not able to troubleshoot
things under IIS that well (yet).
> > Of course, if I could figure out #1, I may be better able to debug #2 :)
>
> Can't help you with #1 other than to see what the IIS and system logs
> state.
They're not getting much of anything... bleh...
Maybe I will just change the business requirements to use FTP :)
H
More information about the talk
mailing list