Seite 1 von 1

[ERLEDIGT] pafiledb unerklärbarer fehler

Verfasst: 07.02.2006 00:32
von BIG Mule
Hallo,

Habe das Download MOD von phpbb.com Klicke installiert.

Beim Uploaden ist alles ok. Meldung "Datei wurde erfolgreich hochgeladen" erscheint. Danach befindet sich die Datei in meinem FTP unter uploads.

Folgender Fehler tritt auf:

Beim Downloaden bekomme ich immer nur eine 0 kb grosse Archivdatei, was laut meinem Packer Programm ein ungültiges Archiv ist, folgedessen kann er es auch nicht öffnen.

Wenn ich die Datei von meinem FTP aufs PC lade, lässt sich das Archiv ohne weiteres öffnen.

Wie kann ich dieses Problem lösen.

Danke im vorraus.

Verfasst: 07.02.2006 02:23
von BIG Mule
Habe bei phpbb.com mal rumgestöbert und einiges ausprobiert. Für alle die irgendwann mal das gleiche Problem haben. Hier ist die Lösung.

Code: Alles auswählen

############################################################## 
## MOD Title: pafiledb fast download update 
## MOD Author: OmNi.Eternal < eternal[at]clanomni[dot]com > 
## MOD Description: This modification will replace the download code in function send_file_to_browser to speed up downloads 
## MOD Version: 0.1.0 
## 
## Installation Level: Easy 
## Installation Time: 2 minutes 
## Files To Edit: pafiledb/modules/pa_download.php 
## Included Files: 
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 
############################################################## 
## For security purposes, please check: http://www.phpbb.com/mods/ 
## for the latest version of this MOD. Although MODs are checked 
## before being allowed in the MODs Database there is no guarantee 
## that there are no security problems within the MOD. No support 
## will be given for MODs not found within the MODs Database which 
## can be found at http://www.phpbb.com/mods/ 
############################################################## 
## Author Notes:  This could apply to other mods which used this method to send files 
##       
############################################################## 
## MOD History: 
## 
##   2005-09-25 - Version 1.0.0 
##    
## 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 
# 
#-----[ OPEN ]------------------------------------------ 
# 
pafiledb/modules/pa_download.php 


# 
#-----[ FIND ]------------------------------------------ 
# 
       $result = @readfile( $filename ); 
# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 
      $fpop = fopen( $filename, 'rb'); 
      while(!feof($fpop)) { 
         $buffer = fread($fpop, 32*1024); 
         print $buffer; 
      } 
      fclose ($fpop); 
      // $result = @readfile( $filename ); 
# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM