Delete file error

All support enquiries for DFH go in here...

Delete file error

Postby iheartbreakz » Wed Nov 16, 2011 2:36 pm

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
iheartbreakz
Moderator + Premium + Code Tester
 
Posts: 100
Joined: Wed Apr 20, 2011 2:14 pm

Re: Delete file error

Postby test » Wed Nov 16, 2011 5:18 pm

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)?
test
Standard Member
 
Posts: 37
Joined: Tue Apr 05, 2011 1:21 pm

Re: Delete file error

Postby iheartbreakz » Wed Nov 16, 2011 7:13 pm

when i click the delete link not from admin panel
iheartbreakz
Moderator + Premium + Code Tester
 
Posts: 100
Joined: Wed Apr 20, 2011 2:14 pm

Re: Delete file error

Postby test » Wed Nov 16, 2011 7:33 pm

Ok, I'll test it too when I have the time. DFH v1.2.3, right? :)
test
Standard Member
 
Posts: 37
Joined: Tue Apr 05, 2011 1:21 pm

Re: Delete file error

Postby iheartbreakz » Wed Nov 16, 2011 11:34 pm

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?
iheartbreakz
Moderator + Premium + Code Tester
 
Posts: 100
Joined: Wed Apr 20, 2011 2:14 pm

Re: Delete file error

Postby test » Thu Nov 17, 2011 11:14 am

Unfortunately, I don't know nothing about PHP, but I'll ask this: Have you modded your DFH installation in any way?
test
Standard Member
 
Posts: 37
Joined: Tue Apr 05, 2011 1:21 pm

Re: Delete file error

Postby iheartbreakz » Thu Nov 17, 2011 5:46 pm

yea i have
iheartbreakz
Moderator + Premium + Code Tester
 
Posts: 100
Joined: Wed Apr 20, 2011 2:14 pm

Re: Delete file error

Postby SamEA » Thu Nov 17, 2011 9:19 pm

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.
SamEA,
DaddyScripts' Admin & Developer.

Require a PHP or general IT freelancer? Don't hesitate to PM me.
User avatar
SamEA
Site Admin
 
Posts: 1165
Joined: Sat Feb 19, 2011 7:51 pm

Re: Delete file error

Postby iheartbreakz » Thu Nov 17, 2011 10:14 pm

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);
}

}
iheartbreakz
Moderator + Premium + Code Tester
 
Posts: 100
Joined: Wed Apr 20, 2011 2:14 pm

Re: Delete file error

Postby SamEA » Mon Nov 21, 2011 12:34 pm

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
SamEA,
DaddyScripts' Admin & Developer.

Require a PHP or general IT freelancer? Don't hesitate to PM me.
User avatar
SamEA
Site Admin
 
Posts: 1165
Joined: Sat Feb 19, 2011 7:51 pm

Next

Return to Daddy's File Host v1.X

Who is online

Users browsing this forum: No registered users and 8 guests

cron