Som more tests during the day. Changed the download method from model->download() to a direct download from the view. It works OK!! I can start concurrent downloads and go on with a new action.
Added a $this->redirect(model->download()) without success. I must play some more time with diferent status codes and Live HTTP Headers/ apache error_log to see if this could be the solution. Without specifying a $status I get no good results. Some expert in $this->redirect and the array of available $status?? On 24 ago, 09:30, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Too much caffeine yesterday so I' could think a while during the > night ;) > > The first thing I've tested is to put the uploaded files in the "/ > files" folder so they are accesible by Apache folder listings. Using > this trick everything works as expected. I can start several > concurrent downloads. So the good news here are that Apache config is > OK. > > Let's post some code: > View:http://bin.cakephp.org/view/830482790 > Controller:http://bin.cakephp.org/view/262098988 > Model:http://bin.cakephp.org/view/1927189257 > > I can't found any reference for a similar problem so it perhaps is a > silly error which nobody else has done. I don't know. > > On 23 ago, 22:59, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > Tested with Firefox and IE .. same behaviour. About server > > configuration .. maybe. The development environment is CentOS 4.4, > > almost default install, running in a local vmware server console. > > Changed "KeepAlive", which is the only configuration parameter which > > seems kind of related, without success. > > > Done some google with "+php +download+freeze" and "+apache +download > > +freeze" without founding anything interesting. Neither changing > > "freeze" for "block". > > > In a few hours i will post controller, model and view to the bin. > > > Thanks four your interest. > > > On 23 ago, 21:23, nate <[EMAIL PROTECTED]> wrote: > > > > This sounds more like a browser or webserver configuration issue. > > > > On Aug 23, 1:18 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > > > Thanks for you answer!! > > > > > I've already set "Content-Disposition: attachment; filename=\"$filename > > > > \"", and also an option for the IE problem with multiple dots. > > > > > My first cake so at this stage I'm not using the Security component. > > > > CAKE_SECURITY set to 'high', also tested with 'medium' without > > > > success. I'm not sure of fully understanding your suggestion about > > > > Security and Session handling. > > > > > The session don't die as long as thedownloadtime is smaller than the > > > > session lifetime .... it simply freezes. After thedownloadstarts the > > > > user can request anything he wants. But the browser will not receive > > > > any data until the donwload is finished. Click fordownload,download > > > > starts, click on _put_any_number_here_ links from the page and finally > > > > whendownloadfinishes the last action requested is processed. > > > > > If you are downloading small files or working from intranet the user > > > > perhaps doesn't notice the behaviour, but downloading a 50MB file from > > > > the internet at 15KB/s you can imagine the result. For testing I > > > >downloadsmaller than 1MB files at 10KB/s so the file size is not > > > > causing the problem. > > > > > Only the current session gets frozen. I've run tests with 3 or more > > > > concurrent sessions (downloading diferent files with diferent file > > > > sizes as 700kb or 170MB) and all of them freeze when thedownload > > > > starts and get back to life when it finishes. > > > > > I assume that when my controller action calls the modeldownload > > > > method it doesn't give up until the method "return's". And the method > > > > does not "return" until the chunked "fread" ends due to "feof" > > > > condition. So what I need is something like "fire and forget" the > > > > method from the action, so the user can go on with other actions. > > > > > Thanks again, > > > > Juan > > > > > On 23 ago, 17:23, nate <[EMAIL PROTECTED]> wrote: > > > > > > Set the content-disposition header so thedownloadgets forked out to > > > > > a separate request, and use Ajax on the main application page to keep > > > > > the session alive. Are you using the Security component? What are > > > > > your session security settings? > > > > > > On Aug 23, 10:36 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > > > > > Hello, > > > > > > > In my project the users will usuallydownloadfiles with sizes up to > > > > > > 150MB at limited speeds depending on the remote location (intranet/ > > > > > > internet), so thedownloadprocess can take hours. I've created a > > > > > >downloadfunction in a model which is requested by a function in a > > > > > > controller. > > > > > > > The problem is that once thedownloadbegins, the application gets > > > > > > frozen and the user can't do any other action within this session > > > > > > until thedownloadis finished. The desired behaviour would be that, > > > > > > while enough bandwith is available, the user candownloadseveral > > > > > > files simultaneously. > > > > > > > I've searched the group and done some google work without success. > > > > > > Perhaps the solution is not so complicated but I don't know how to > > > > > > fix > > > > > > this behaviour. > > > > > > > Any idea on how to solve this problem? Can you point me to a > > > > > > resource > > > > > > related to this issue? > > > > > > > Thanks, > > > > > > Juan > > > > > > > CakePHP/1.1.16 on Apache/2.0.52 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
