Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I recently moved my file upload service to a new host, a Windows server (was on CentOS before). I'm running IIS + PHP on it, and moved all the php.ini settings from the previous server to the new one. The problem is, however, that large uploads seem to be timing out. The JS uploader never gets a response from the PHP script, as I guess it times out.

Here are the most common upload related php.ini options I have set:

max_execution_time=0
max_input_time=0
post_max_size=5000M
upload_max_filesize=4900M
memory_limit=5500M
file_uploads=On
session.gc_maxlifetime=172800
session.cache_expire=2880

(I have limited the download sizes in the script, don't worry)

According to online resources and others' problems I've read, those settings should let the uploads finish just fine - and they did on the previous server. Smaller (and quicker?) uploads work just fine, and all the required directories are writeable.

share|improve this question

migrated from stackoverflow.com Jul 11 '11 at 17:39

This question came from our site for professional and enthusiast programmers.

add comment

2 Answers 2

up vote 0 down vote accepted

Solved my problem. Apparently, IIS7 has its own limit for requests. More information here: http://stln.co/fwNKcp

share|improve this answer
add comment

Look at http://php.net/manual/en/ini.core.php

search for upload_max_filesize

PHP allows shortcuts for bit values, including K (kilo), M (mega) and G (giga). PHP will do the conversions automatically if you use any of these. Be careful not to exceed the 32 bit signed integer limit (if you're using 32bit versions) as it will cause your script to fail.

I think 5GB is out of range

BTW this question belongs to server fault

share|improve this answer
    
I tried lowering the limits, but the uploads still seem to fail. And the amounts worked on the previous server (both are 64bit). Also, I wasn't sure if this was a server configuration error or something with PHP, so I wasn't sure where to post this. Thanks anyway. –  Miikka Virtanen Jul 11 '11 at 16:58
    
Tomalak: From what point can I vote to move it ? I dont have enought rep, but I didn't find any information about migrating (voting) –  genesis Jul 11 '11 at 17:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.