If it's taking longer than about 25-30 seconds you could be timing out. Try putting set_time_limit(0) at the top of the script. If it works you might want to try replacing the 0 with a reasonable time limit. The time is in seconds.
Vince.
Are you sure that would work? I may be wrong, but my gues would be that the "set_time_limit(0)" would not be evaluated until the posted file has been received and then the php starts executing. I would think that one has to change a php-setting hard.