TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,026
  • Total Topics: 21,333
  • Online today: 916
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 459
  • Total: 459

Download section, problem downloading

Started by raid, November 08, 2008, 09:14:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

raid

hi,

I am having problems on my download section, sometimes happens that clicking on the Download button, nothing is downloaded.

I wrote to my host asking information about this issue, and they said that tinyportal loads the whole file to download on server memory (I think on Buffer memory, the same used for scripts). So when the buffer is full, the file isn't downloaded.

there is a way to part the files during the buffer loading, so without waste the buffer?
SMF 2.0 + TP RC2

G6Cad

Nothing we can do within TP no
You need to eather ask your host to fix that issue as it's a server issue, or make the download files maller or something

IchBin

The only thing that is used is output buffering. If you're getting that error, it is probably because your host is over-selling their server. It sounds like they have too many clients on their server eating up the memory that their php configuration is set at. If you're host isn't willing to fix this, you should move hosts.

raid

#3
right now my buffer is 24MB, is it good?
SMF 2.0 + TP RC2

G6Cad

not really if you are ona shared host, you have to talk to them raid, you and them are the ones holding the answers to your question how to solve this issue you have  :-\

raid

hi, sorry for the late reply, now it works for file under 8mb, but what about chenge the link on Download button?

to remove the Get function, and add the direct html link to the file, so to not waste the buffer memory? is it a good idea, or is it unsafe? (about security)
SMF 2.0 + TP RC2

G6Cad

Unsafe it is as the functions are removed through the security

raid

#7
yes, but I don't want ot change the main code, just want to change the template, and change the download button like:

example:
Code (Old) Select
<a href="*board url*/index.php?action=tpmod;dl=getXXX"><img style="margin: 5px;" align="right" src="*images dir url*/TPdownloadfile.gif" alt="" /></a>
Code (New) Select
<a href="*board url*/*download folder*/*filename*"><img style="margin: 5px;" align="right" src="*images dir url*/TPdownloadfile.gif" alt="" /></a>

May I have some problems making these changes?
SMF 2.0 + TP RC2

IchBin

Changing the button would change it for ALL download items. At this time, TP does not support having direct links.

raid

#9
thx for reply, changing this, makes it possible (it's just a test):
Code (TPdlmanager.template.php) Select
<a href="*board url*/*download folder*/'.$dlitem['file'].'"><img style="margin: 5px;" align="right" src="*images dir url*/TPdownloadfile.gif" alt="" /></a>

and just change the htaccess, and add an index.php to not make browsable the tp_download folder.

My question is if it's safe, with download folder chmod 755

thx
SMF 2.0 + TP RC2

This website is proudly hosted on Crocweb Cloud Website Hosting.