Menu

#13 file download problem, files open corrupt

open
nobody
None
5
2014-12-07
2007-11-13
tpearson74
No

hello...i have up and running the 3.3b version and its working good minus the fact that if i upload a file and then try to download it...it opens corrupt. this is on pdf, word and excel....notepad txt files seems to work fine.
unfortantely i can not seem to figure why this is happening and can not use this product unless this is fixed

Discussion

  • MTO

    MTO - 2007-11-19

    Logged In: YES
    user_id=1940799
    Originator: NO

    I'm having the same problem with phpwebftp. I noticed that when downloading the file is corrupted because the file size is a few bytes smaller than the actual file. So I guess it's not downloading everything. Maybe a problem with compression?

     
  • Nobody/Anonymous

    Logged In: NO

    I have the same problem both with 3.3 and 4.0

     
  • Nobody/Anonymous

    Logged In: NO

    Same problem for me...Files are still corrupted during upload.
    Tested with all versions including 4.0.
    This is a big problem. My ftp serveur is on OVH.

     
  • Nobody/Anonymous

    Logged In: NO

    i dropped this and got upload pro working and doing more then this web app can do.

     
  • Nobody/Anonymous

    Logged In: NO

    same problem for me.all files corupted during upload.
    Otherwise, it's seems to be a good script.

     
  • Nobody/Anonymous

    Logged In: NO

    Same problem here !

     
  • Nobody/Anonymous

    the usage of the php function for ftp command is wrong. They are using "0" and "1" for ascii or binary tranfer. In fact php needs a different syntax.. If anyone is interested, I can put a patchfile on my webserver...

     
  • Alberto Betella

    Alberto Betella - 2009-01-26

    I had the same problem.
    Solution: As it was written before "the usage of the php function for ftp command is wrong", thus, in the file inlcude/ftp.class.php I replaced number 0 and 1 with this "FTP_BINARY" on lines 25 and 67.

    Line 25 of ftp.class.php becomes:

    var $mode = FTP_BINARY;

    and line 67 becomes:

    function setMode($mode=FTP_BINARY) {

    In this way works for me.

     
  • NickWilsdon

    NickWilsdon - 2009-02-23

    We have exactly the same issue. Text files are fine but other filetypes corrupt when they are uploaded (doc/xls). Tried yellowjug's solution with FTP_BINARY but this doesn't correct it for us.

    It maybe something to do with the server config. This is an interesting thread at Metafilter:

    http://ask.metafilter.com/85404/PHP-Uploads-Result-in-Corrupt-Files

    However net2ftp seems to work so it could be related to the coding/structure of this app. Any help people have would be appreciated, this is quite frustrating.

     
  • NickWilsdon

    NickWilsdon - 2009-02-23

    Actually looking at some of the bug submits here (2007 and not assigned to anyone yet) this looks like a dead project.

     
  • Robert Fidler

    Robert Fidler - 2009-03-31

    I have listed all the needed files and lines of code for changing the reference to mode from (0 | 1) -- > (FTP_ASCII | FTP_BINARY):

    index.php:

    line 417:
    change - $newMode=($ftp->mode==1)?0:1;
    new code - $newMode=($ftp->mode==FTP_BINARY)?FTP_ASCII:FTP_BINARY;

    line 651:
    change - $newMode=($ftp->mode==1)?0:1;
    new code - $newMode=($ftp->mode==FTP_BINARY)?FTP_ASCII:FTP_BINARY;

    line 950:
    change - <?=$ftp->mode==FTP_BINARY?$lblBinaryMode:$lblASCIIMode;?>
    new code - <?=$ftp->mode==0?$lblBinaryMode:$lblASCIIMode;?>

    include/ftp.class.php
    line 25:
    change - var $mode = 1;
    new code - var $mode = FTP_BINARY;

    line 67:
    change - function setMode($mode=0) {
    new code - function setMode($mode=FTP_ASCII) {

     
  • miroxlav

    miroxlav - 2010-04-03

    I confirm rfidler's solution fixes file corruption problem!

    (One small note to his solution: in paragraph called "line 950": code for "change" and "new code" should be actually swapped)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.