ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
i've programmed a small, browserbased file up/download client in php, which is running on a linux server.
everything works fine, just one thing is really driving me crazy: sometimes during downloading the file, the process is just stopping. it's not breaking the connection or sth, just the download rate goes down slowly to zero, and the transfer seems "freezed"...
but through an SSH-Transfer-Client, i can receive the files without problem...
are the files corrupted during download my script? does anybody has an idea, why it's this way?
It could be your download is taking longer than the default timeout of (IIRC) 30 seconds. Have a look at http://nl.php.net/set_time_limit
Another possibility might be that you're exceeding the maximum allowed size one may upload to the web server. More info at http://nl.php.net/features.file-upload .
unfortunately, it can't be one of this points...
i've set the timelimit to 30 minutes, and the post upload size to 400 mb...(and some people also did successfully up + download a 400 mbyte file)
Could be some nasty network congestion somewhere. Have you been able to reproduce the mal-behaviour yourself? If so, try using some sort of network traffic analyser (ethereal is nice). Other than that I really don't have a clue. You could try one of PHP's official mailing-lists. If they don't know either, then maybe the Apache people have a clue
i've just found out that the same problem exists with JPG images...and there i found an anwser: in some JPG are XML tags, and as it seems, this causes exactly the same error. so maybe the files which causes the problem on my server has also some XML content...
Originally posted by sam99 i've just found out that the same problem exists with JPG images...and there i found an anwser: in some JPG are XML tags, and as it seems, this causes exactly the same error. so maybe the files which causes the problem on my server has also some XML content...
well, thanks anyway for your replies :-)
sam
Complete shot in the dark here... but could Apache be trying its Mime Magic stuff on the JPEG file? It may detect it as a jpg first but perhaps the XML content is confusing it?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.