Page 1 of 2

Delete file error

PostPosted: Wed Nov 16, 2011 2:36 pm
by iheartbreakz
in download.php this line:

if($thisline[10] <> ""){
unlink("./userfiles/files/" .$thisline[10] ."/" .$filecrctxt);
}

can anyone tell me what it does? because when i remove it.. the delete page is working fine with no errors

when i leave it.. it says file not found or whatever

Re: Delete file error

PostPosted: Wed Nov 16, 2011 5:18 pm
by test
Interesting... I will test this when I have the time, to confirm.

Just one question though - do this happen when you delete a file from the Admin Control Panel, or when you use the "Delete Link" (the link that you get after you upload a file)?

Re: Delete file error

PostPosted: Wed Nov 16, 2011 7:13 pm
by iheartbreakz
when i click the delete link not from admin panel

Re: Delete file error

PostPosted: Wed Nov 16, 2011 7:33 pm
by test
Ok, I'll test it too when I have the time. DFH v1.2.3, right? :)

Re: Delete file error

PostPosted: Wed Nov 16, 2011 11:34 pm
by iheartbreakz
yea..

Warning: unlink(./userfiles/files/ /372drangonfly.jpg.dfh) [function.unlink]: No such file or directory in /home/content/24/7893024/html/upload/download.php on line 89

i see 2 slashes after files.. that might be the reason.. do you know how to fix it?

Re: Delete file error

PostPosted: Thu Nov 17, 2011 11:14 am
by test
Unfortunately, I don't know nothing about PHP, but I'll ask this: Have you modded your DFH installation in any way?

Re: Delete file error

PostPosted: Thu Nov 17, 2011 5:46 pm
by iheartbreakz
yea i have

Re: Delete file error

PostPosted: Thu Nov 17, 2011 9:19 pm
by SamEA
Why were you modifying the delete script? I advise you to replace ./admin.php with the original DFH file. To fix your problem, make sure 372drangonfly.jpg.dfh does not exist in ./files and ./storage.

Re: Delete file error

PostPosted: Thu Nov 17, 2011 10:14 pm
by iheartbreakz
problem still exists.. heres the difference is the code:

fclose($fh2);
if($thisline[10] <> ""){
unlink("./userfiles/files/" .$thisline[10] ."/" .$filecrctxt);
}
unlink("./files/".$filecrctxt);
}

}

it works fine if i change it to this:

fclose($fh2);
unlink("./files/".$filecrctxt);
}

}

Re: Delete file error

PostPosted: Mon Nov 21, 2011 12:34 pm
by SamEA
Again, replace ./admin.php with the original one.

Also, remove the files in

./userfiles/files/{USER}/372drangonfly.jpg.dfh
./files/372drangonfly.jpg.dfh
./storage/372drangonfly.jpg