Warnung nach Bilderupload

ingo preuss

Mitglied
Hallo,
nach uploaden eines Bildes kriege ich folgende Meldung:
Code:
   Warning:  move_uploaded_file() [function.move-uploaded-file]: 
  SAFE MODE Restriction in effect.  The script whose uid is 15105 
  is not allowed to access / owned by uid 0 in 
  /home/www/htdocs/isorast24.de/upload2.php on line 9
  
  Possible file upload attack!  Here's some debugging info:
  Array
  (
      [userfile] => Array
          (
              [name] => apfel_klein.jpg
              [type] => image/jpeg
              [tmp_name] => /home/www/htdocs/isorast24.de/tmp/phphz5ZZD
              [error] => 0
              [size] => 12039
          )
  
  )
Der Ordner, in dem ich ablegen will, hat 777 als Rechte.
Das upload-Skript sieht so aus:
PHP:
  <?php
  // In PHP kleiner als 4.1.0 sollten Sie $HTTP_POST_FILES anstatt $_FILES verwenden.
  // In PHP kleiner als 4.0.3 verwenden Sie copy() und is_uploaded_file() anstatt von
  // move_uploaded_file()
  
  $uploaddir = '/upload/';
  
  print "<pre>";
  if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploaddir . $_FILES['userfile']['name'])) {
     print "File is valid, and was successfully uploaded.  Here's some more debugging info:\n";
     print_r($_FILES);
  } else {
     print "Possible file upload attack!  Here's some debugging info:\n";
     print_r($_FILES);
  }
  
  ?>

Gruß, Ingo
 
Zurück