Search code examples
phppythonlarge-file-upload

File Upload With Hosting Account Killing Scripts After 60 Seconds


I have set all of my PHP settings in the php.ini file to allow for file sizes over 30mb and max times over 5 minutes. The problem I am having is that the hosting account I have to use is killing all scripts within 60 seconds

Script restrictions All scripts have the following memory and run time limitations:

Memory: Some PHP CMS applications may need a larger memory_limit than the default set in the php.ini. You may change this limit in your php.ini, however, do not exceed the maximum of 64M.

Run time: All PHP/CGI/Perl scripts are limited to a 60 seconds run time. If your script does not complete during that time, it will be killed. BlueDomino cannot allow custom scripts to impact the performance of other customer sites on our shared hosting platform.

I currently have a flash uploader that I created that sends the data to PHP for processing. I works perfectly for files that take less than a minute but fails if it takes longer than a minute :/

Is there another ways around this problem? Maybe using a different programming language like Python?


Solution

  • You could create some kind of flash uploader which uploads a chunk at a time of the file, each request will then be short but you will instead make several of them. When the last chunk is uploaded you call a script which merges all the chunks to one file.

    A simple googling gave me this: http://www.plupload.com/