1

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.

2 Answers 2

0

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

2
  • 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.
    – Dragory
    Jul 11, 2011 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, 2011 at 17:03
0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .