I'm currently using the classic shared web hosting and am using some custom PHP to serve some downloads on my (Wordpress) site. This is fine for the most part but I get the occasional user, who I presume is on a slow connection because they're often from Asia and Africa, who is unable to download the file (~100MB). I've tried increasing the PHP maximum execution time to no avail. I am finding it difficult to debug as I am not able to reproduce the problem but I may try and throttle my connection at some point to confirm my hypothesis.
The next thing I was going to try was to use mod_xsendfile as suggested here: https://www.gravitywell.co.uk/latest/how-to/posts/securing-your-downloads-with-php-and-mod-xsendfile... for example.
It looks like it's not installed on this server, and I am pretty certain it's not something I'll be able to install myself.
Any thoughts on how to proceed? Either a solution to this problem, or the one of failing downloads more generally would be gratefully appreciated!
Presumably you are suggesting that the client should use curl? Really, I am trying to make the process as seamless as possible - that is to say it should be no harder than clicking a link to download the software (and most of the time it isn't).
In addition to this, as it stands, it is necessary to be logged in to the site to check that the user has agreed to the licence for the software they wish to download and whilst it is technically possible for them to export the cookie out of their browser it unnecessarily complicates the process.
"Give them an inch..............."
Yes of course I mean for them to use CURL. One can not control the internet speeds or connection reliability for clients downloading. You can only control the platform from which your client downloads your software. I for one would not be using a Wordpress platform to begin with. That's not bias. That's because Wordpress sites are very slow to begin with.
But if there were download difficulties in areas of the world where the internet service is not great shall we say, then an alternative solution (if not a better platform) would be to post the software! Radical I know, but a cd rom would be an ideal solution and guarantee delivery.
Either that or give instructions to your clients to use CURL, again, radical again I know.
Agreements can be signed by simple form beforehand, along with address for posting.
A long time ago we used to post the software!
Once they have identified the problem of prematurely terminating downloads, they have typically got in touch with me and I have arranged a time-limited, password-protected (.htaccess/.htpasswd) download which has always worked and is quicker and more certain than the post.
This why I suspect that using the mod_xsendfile approach would also work and reduce load on godaddy's servers.
I have investigated using curl for those who were keen to script their downloads (?!) but it is again a multiple-step process that requires manual intervention. It shouldn't be that hard!
Yes I agree, it shouldn't be, and sometimes a problem and it's complexities can just make you tear your hair out. Then I do this........
I go make myself a cup of tea...... for small problems.
I go for a walk........ for big problems.
I come back, I sit down and try and re think the problem. In other words (as a developer and programer) I work out the algorithm of the problem. I do this in all areas of my life, and although this means I'm 100% geek and thought of as funny by most of the population, the world needs us geeks!
So work out the easiest way to get your software out there.
I will be presumptuous here, I guess that in Countries with bad internet services, that the computers these folk are using are also low tech. I would first of all point all my clients to the very good open software such as linux and Gnu project offer. Hand on my heart, their software although not as glossy as Windows, far, far surpasses anything Windows can produce. A little known fact is that even Mac were nowhere near as great as they are today, before they based their entire system on a UNIX variant called BSD!
The other thing is that although some tech is designed to make life easier, you first as a responsible software provider, have to put the ease of client use at the forefront. It's no good at all having high tech at our end, if at the client end they are still running Windows XP. Just offer a posted cd rom as an alternative for those with poor internet. You will then feel the love and not the blame when they can't download your software.