Loading...
 
Skip to main content

Features / Usability


File gallery download blocks any activity of the user

posts: 4

Hi!
While downloading a file from the file gallery, the logged in user can not access any pages of the tiki system - the server does not respond and the browser gets a timeout. If I log in with another browser at the same time as the same user, navigating on the page is possible without any problems.
Does anyone have an idea what could be the problem? I thought that maybe php only allows one process per session and thus blocks any other site activity if a download over php is going on, but I couldn't find documentation about any limitations.
It would be great if anyone could offer a solution for this problem.

Thanks in advance

posts: 23 Germany

Good observation. We should call a session_write_close() before the file is sent to the browser.

redflo

posts: 4

Thanks a lot for this hint. I didn't know that such a session file protection exists. I added it to tiki-download_file.php and it works fine now.
It's not too difficult to observe, if you offer >100mb files to download 😉

posts: 7 Norway

> Thanks a lot for this hint. I didn't know that such a session file protection exists. I added it to tiki-download_file.php and it works fine now.
> It's not too difficult to observe, if you offer >100mb files to download 😉

I am having a related problem with downloading files from a TikiWiki 1.9 installation on a Windows 2003 server. Seems like the availability of the file (in File Gallery - database storing) stops after about 4-5 minutes.

I currently live in Tanzania, and the bandwidth is not very good (from 16 Kbytes/sec and up). This means that some downloads would take more than 4-5 minutes.

Downloading the files from Norway is easy going. So - Is the suggested procedure good enough for solving this problem?

I would like to have a timeout of around 20 minutes from the file is fed to the webserver cache, and until it is (or should be) ready downloaded from the server to the users browsers.

I have checked script timeout on PHP and on MySQL. The problem seems to be as described above - ie. related to the file cache somewhere after the file has been extracted from the datbase and made available on the server (cache?).

Hope someone can tell more about this.


posts: 4

Thanks a lot for this hint. I didn't know that such a session file protection exists. I added it to tiki-download_file.php and it works fine now.
It's not too difficult to observe, if you offer >100mb files to download 😉

posts: 33 United States

> Thanks a lot for this hint. I didn't know that such a session file protection exists. I added it to tiki-download_file.php and it works fine now.
> It's not too difficult to observe, if you offer >100mb files to download 😉

Hello,

I don't see the reply that you reference, and it might be of interest to me--I mean the addition of code for session protection: could you please post the hint that you received? Thanks

posts: 4

> Hello,
>
> I don't see the reply that you reference, and it might be of interest to me--I mean the addition of code for session protection: could you please post the hint that you received? Thanks

My message should be a reply to redflo's message - my mistake. Simply add session_write_close(); in the file tiki-download_file.php before the first header(...) line.