Re: Re: File Upload - post_max_size and upload_max_filesize in GBs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sukhwinder Singh wrote:
PHP's handling of uploaded files is confusing. I have added logging to the script to which jupload posts. Logging suggests that php file is only accessed after file is completely uploaded by jupload. I also checked apache access logs. Entry in apache log appears only after file is completely uploaded.

Absolutely correct - the data sent with an HTTP POST will be completely uploaded before the PHP script is started. Likewise, the entry in the apache log will only be done once the request is completed otherwise it doesn't know all the information it needs.

Another thing that came up with this jupload is that as soon as I hit upload button, a file named phpxx.tmp (xx is any number) is created in temporary directory and its size starts growing as upload happens.

If applet doesn't post to php even at start then how come the temporary file is named phpxx.tmp.

The applet *does* POST to PHP. However, it has the option to upload to an FTP server.... "the choice of using HTTP, HTTPS or FTP connections for your transfer" (from the website).

I tried to upload file on internet using jupload and it seems to me script is timing out even when I have specified 1 hour as timeout.
set_time_limit(216000);

137 MB upload seemed to time out. and the set_time_limit doesn't seem to have any affect.

Now the even if I accept php's 1.99 GB limit. What to do about this timeout? Do I have to set it in php.ini? Why woudn't it work through the above function?

The timeout is likely coming from Apache. It has a limits similar to PHP.

Stut is suggesting it has to be custom made as this kind of solution doesn't seem to already exit. A solution where some applet etc. only passes that information to php which is needed to move the file and update the database.

Indeed, that is what I'm suggesting. However, I *do* think the solution exists, but I've only ever seen it on specific websites. I've never seen a product that can do this sort of thing.

If you don't mind me asking, what are people uploading? 4gig is a lot for a single file of any type except maybe DVD images. Is there no way the user can upload several (read lots) smaller files instead of one big one?

-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux