Author Topic: Cannot get temporary file! -bei zip downloadversuch  (Read 12049 times)

0 Members and 1 Guest are viewing this topic.

Offline Sr.Corto

  • Newbie
  • *
  • Posts: 18
    • View Profile
Cannot get temporary file! -bei zip downloadversuch
« on: December 12, 2006, 07:11:54 PM »
Hi! Wenn ich ein oder mehrere gezippte Bilder downloaden will, kommt die Fehlermeldung: "Cannot get temporary file!"

Weiss jemand Rat?

Vielen Dank!

MfG Corto

edit: Ihr könnt euch auch gerne mal unter http://pino.pytalhost.de/4images/ mit test/test anmelden und schauen
« Last Edit: December 13, 2006, 04:17:29 PM by Sr.Corto »

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Re: Cannot get temporary file! -bei zip downloadversuch
« Reply #1 on: December 14, 2006, 12:31:22 PM »
Das bedeutet, dass die Funktion tmpfile() keine temporäre Datei im System anlegen kann. Frage mal bei Deinem Hoster diesbezüglich nach. Evtl. hat er das in der Konfiguration unterbunden.

Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline Sr.Corto

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Cannot get temporary file! -bei zip downloadversuch
« Reply #2 on: December 14, 2006, 05:21:39 PM »
in welchen ordner wird die datei denn geschr.?

MfG Corto

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Re: Cannot get temporary file! -bei zip downloadversuch
« Reply #3 on: December 14, 2006, 05:23:48 PM »
In den temp-Ordner des Servers. Das hat nichts mit 4images deshalb musst Du auch Deinen Hoster kontaktieren.

Gruß Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline Sr.Corto

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Cannot get temporary file! -bei zip downloadversuch
« Reply #4 on: December 17, 2006, 01:43:48 AM »
hab beim hoster nachgefragt....die hatten tmpfile() mal wegen eines sicherheitsloches in php deaktiviert, jedoch sollte es seit einiger zeit wieder funktionieren...(er hat mir auch noch geraten php einmal zu deaktivieren, kurz zu warten und wieder zu aktivieren... hat aber auch nix gebracht)

Gibt es nicht vllt. noch eine andere Lösung?

Vielen Dank!

MfG Corto

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Re: Cannot get temporary file! -bei zip downloadversuch
« Reply #5 on: December 18, 2006, 12:36:52 PM »
Probiere mal folgendes. Öffne includes/zip.php und ersetze

Code: [Select]
$this->tmpfp = @tmpfile();
mit

Code: [Select]
    $path = ROOT_PATH . "tmp";
    $handle = opendir($path);
    while ($file = @readdir($handle)) {
      if ($file{0} == ".") {
        continue;
      }

      if (@is_file($path."/".$file)) {
        if ((filemtime($path.'/'.$file) + (60 * 5)) < time()) {
          @unlink($path."/".$file);
        }
      }
    }

    $this->tmpfp = fopen(tempnam($path, "zip"), "wb+");

Falls es damit noch nicht funktioniert, erstellst Du im 4images-Ordner einen Ordner "tmp" (chmod 777).
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline Sr.Corto

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Cannot get temporary file! -bei zip downloadversuch
« Reply #6 on: December 18, 2006, 03:58:49 PM »
HI!

Vielen Dank!

Der Hoster hat das wohl mal selbst ausprobiert und hat mir geschrieben, dass ich doch mal
Code: [Select]
$this->tmpfp = @tmpfile();mit
Code: [Select]
$this->tmpfp = fopen(tempnam(ini_get("upload_tmp_dir"),""), "w+");
ersetzen solle.... hier wird ja dann die funktion fopen() benutzt... wo genau liegt der unterschied, bzw. was ist besser?

Danke! MfG Corto

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Re: Cannot get temporary file! -bei zip downloadversuch
« Reply #7 on: December 18, 2006, 04:01:18 PM »
Das ist im Prinzip das gleiche. Er benutzt das Uploadverzeichnis von PHP und ich ein egenes Verzeichnis plus Routine um alte Dateien zu löschen. Kannst Dir eins aussuchen ;)
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline Sr.Corto

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Cannot get temporary file! -bei zip downloadversuch
« Reply #8 on: December 18, 2006, 04:03:15 PM »
aso... und wann werden die tmps von php dann gelöscht? ...eigentlich auch nich so wichtig...Danke!!!

MfG Corto

Offline matobi

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: Cannot get temporary file! -bei zip downloadversuch
« Reply #9 on: June 12, 2008, 01:46:33 PM »
Hallo! Ich habe ebenfalls ein Problem mit dem zip-Download

Bei meinem Hoster habe ich auch schon nachgefragt, woraufhin mir der folgende Tmp-Pfad mitgeteilt wurde:

/is/htdocs/user_tmp/MEINE_KUNDENNUMMER/

Meine Frage ist nun, wie bzw. wo soll ich den Pfad in der Datei zip.php einfügen?

Grüße, matobi

Offline matobi

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: Cannot get temporary file! -bei zip downloadversuch
« Reply #10 on: June 13, 2008, 01:37:40 PM »
O.K. ich habe das Problem behoben!

ich habe einfach wie oben beschrieben:

$this->tmpfp = @tmpfile();

durch

$this->tmpfp = fopen(tempnam(ini_get("upload_tmp_dir"),""), "w+");

ersetzt. Jetzt geht es!

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: Cannot get temporary file! -bei zip downloadversuch
« Reply #11 on: June 13, 2008, 02:09:04 PM »
sorry, hab dein voriges posting nicht gelesen...
schön das es funktioniert.

LG
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi