Zubrag.com
November 15, 2018, 05:26:24 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Downloaded Files are corrupt - Common Problem  (Read 22871 times)
jkiss
Newbie
*
Posts: 1


« on: April 20, 2008, 11:16:56 AM »

I've  read a few comments where after using the script File Download, the file is corrupt. I had the same issue but found the problem and would like to share my findings to help you.

I'm running Fedora Core 4, PHP Version 5.04 and IE 6.0.2900

After downloading any file type, txt or binary they were corrupted or not the same as the original. What I have found is there is at least one extra line added to the top of every downloaded file.

A little more digging and found that the problem is not with the download.php code but somewhere else and the problem was with what I had done.

I added a "include_once" at the top of the file to add in my own defines. The included file is a pure PHP file, meaning it starts with at <?php at the top and the last line is a ?>.

However the problem was with what was past the last ?>, line feeds. By including this file those extra line feeds were added to the top of my downloaded file.

The Fix : After the ?> in my included file I deleted all the blank lines. Then all was well.

Just want to add that File Download version 1.3 works very well. And if I wouldn't have changed anything with it all would have been well.

Cheers
John


Logged
disconap
Newbie
*
Posts: 1


« Reply #1 on: July 10, 2009, 10:28:19 PM »

JKiss, thank you SO MUCH.  This was driving me insane; I had a 30% success rate on various machines (which I still don't understand, since shouldn't the files either have worked or been corrupt?), then read this and deleted some blank space and voila!  All working.  If you're ever in Portland, I owe you a beer.  Smiley
Logged
ricday
Newbie
*
Posts: 2


« Reply #2 on: August 05, 2009, 11:51:46 PM »

I wonder how similar this is to the problem I am seeing: downloaded .zip files are "wrapped" in a folder with the same name as the .zip file (e.g. ABC.ZIP is contained in a folder called ABC.ZIP after download ... double-clicking the downloaded folder in Windoze generates a "corrupt file" warning. but the file can be opened with 7-zip or WinRar). This corruption only happens in IE8 ... the files still download correctly in current versions of FireFox, Opera, Chrome, and Safari.
Logged
PSPLover
Newbie
*
Posts: 2


WWW
« Reply #3 on: March 20, 2010, 03:51:34 AM »

Is it possible to use winrar on Linux Server?
Logged
ridanoor08
Newbie
*
Posts: 4


« Reply #4 on: June 20, 2012, 11:16:15 AM »

I had been suffering alot due to this problem. It resolved in few seconds due to your suggestion... Thanx............ ALot
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC