views:

50

answers:

3

There is a service for uploading large files (more than 500MB) with php/apache. The progress of upload is tracked by the uploadprogress pecl extension. This scheme works fine only for small file uploads.

However, there is a problem when uploading large files. Once the upload is finished, there is a standard information in the $_FILES array showing there are no errors. The problem is that the /tmp/phpXXXX file itself doesn't exist by this time.

I've tested that if we manually remove the tmp file during the upload, upload process will not stop and the error will be raised only after the upload is finished.

Hosting provider says that there are no maintenance scripts that are removing tmp files. Also it says that such tmp files are available in the filesystem almost until the end of the upload, and then they disappear.

Could it be caused by the apache/server/php configuration? Is there anything in the OS that may affect these tmp files?

OS is Ubuntu 8 LTS

Any help would be appreciated!

A: 

Have you checked your server LimitRequestBody parameter ? It may not be high enough for the files you're trying to upload.

Arkh
Thanks, but it is set to 0
Andrey Pesoshin
A: 

Have you verified your php upload_max_filesize and post_max_size settings? (in your php.ini file)

Dan Heberden
yes, they are both about 2GB
Andrey Pesoshin
A: 

Once the upload is finished, there is a standard information in the $_FILES array showing there are no errors.

I'm assuming you checked the error element? It's an integer that corresponds to one of the upload error constants, such as UPLOAD_ERR_INI_SIZE.

As I understand it, UPLOAD_ERR_NO_FILE can also be returned if the file size goes over the PHP post_max_size or some Apache limit (Arkh mentioned LimitRequestBody)

Side Note: Ubuntu 10.04 LTS is out now

R. Bemrose
Thanks. For each uploaded file the error element is 0.Also, after today's testing, it looks like the uploaded /tmp/phpXXXX file still exists at the beginning of the script but then disappears in the strange way
Andrey Pesoshin