On Fri, June 8, 2007 8:58 am, Sukhwinder Singh wrote: > I had a look at that. My problem is that along with uploading file I > also > have to post some other information as well. File names are randomly > generated. Jupload seems to do the work other than that POST problem. > Client > is asking for web based solution. I cannot ask him to do ftp. You are never going to be happy with such large uploads over HTTP, imho. Nor are your users, for several reasons: No way to continue aborted/failed upload, unlike FTP Browser timeout completely outside your control Too many users will think they have to sit and wait to finish > 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. Sort of... You'd have to read Apache and PHP sources to see how it all works for sure, but... > 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. It's entirely possible that Apache and PHP conspire to handle the upload, and do things about the upload, but you won't have any access in php script to it, most likely, until it's all finished. That said, check out Rasmus' recent patch to PHP which allows for an upload progress meter -- It's entirely possible you could glean something useful from that... > If applet doesn't post to php even at start then how come the > temporary file > is named phpxx.tmp. It's posting to Apache which is talking to PHP to handle the upload, but it's a "team" process, and your PHP script has zero access until it's done. > 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); You have to define "timing out" more clearly... Often-times, a browser will give up, even if the upload is proceeding normally. We cannot fix broken web browsers. No matter how much we'd like to. :-) > 137 MB upload seemed to time out. and the set_time_limit doesn't seem > to > have any affect. Then the timeout isn't coming from PHP, but from another source. Apache may be timing out, a buggy browser may be timing out, the Internet connection may simply not be stable enough for a sustained transfer... > Now the even if I accept php's 1.99 GB limit. What to do about this > timeout? A 1.99 G limit is probably file-system based... > Do I have to set it in php.ini? Why woudn't it work through the above > function? You cannot affect file upload in a PHP script, because the upload occurs (or fails to occur) long before your PHP script begins to run -- You can only do it in php.ini or in .htaccess > 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. Perhaps you should look at Flikr's application that they implemented for this purpose, or read "Building Scalable Web Sites" by Cal Henderson (of Flikr) -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php