WebWork Magazin - Webseiten erstellen lassen, Online Medien, html

Webhoster, Webhosting Provider und Domain registrieren

Home | Registrieren | Einloggen | Suchen | Aktuelles | GSL-Webservice | Suleitec Webhosting
Reparatur-Forum | Elektro forum | Ersatzteilshop Haushalt und Elektronik


Homepage und Webhosting-Forum

Scripte und Programme für PHP, MYSQL. Diskussionen zur Programmierung im Web. Fragen zu CMS, Blogsoftware, Shops, Newsletter und vielen weiteren Scripten.


Forum » PHP & MySQL » UploadScript - Wo ist mein Fehler? » Antworten
Benutzername:
Passwort: Passwort vergessen?
Inhalt der Nachricht: Fett | Kursiv | Unterstrichen | Link | Bild | Smiley | Zitat | Zentriert | Quellcode| Kleiner Text
Optionen: Emailbenachrichtigung bei Antworten
 

Die letzten 5 Postings in diesem Thema » Alle anzeigen
von slackerbitch
steht ja schon da, open_basedir.
du kannst mal deinen provider fragen, ob er das upload_tmp_dir zu deiner open_basedir direktive hinzufuegen kann, vielleicht hilft das.
von Ranma-chan
Hi Leute ich hab hier in meinem Member script ne upload funktion, aber irgentwie erhalt ich immer den Fehler
1: 
2: 
3: 
4: 
5:
Warning: copy(): open_basedir restriction in effect. File(/html/member/ragnarok/members/logo.gif) is not within the allowed path(s): (/home/www/web101/) in /home/www/web101/html/member/ragnarok/admin/picture_upload.php on line 16

Warning: copy(/html/member/ragnarok/members/logo.gif): failed to open stream: Operation not permitted in /home/www/web101/html/member/ragnarok/admin/picture_upload.php on line 16

Fehler beim Dateiupload!


Ich weiss absolut net wo der fehler is hier ist der Code meiner picture_upload.php :
1: 
2: 
3: 
4: 
5: 
6: 
7: 
8: 
9: 
10: 
11: 
12: 
13: 
14: 
15: 
16: 
17: 
18: 
19: 
20: 
21: 
22: 
23: 
24: 
25: 
26: 
27: 
28: 
29: 
30: 
31: 
32: 
33: 
34: 
35: 
36: 
37: 
38: 
39: 
40: 
41: 
42: 
43: 
44: 
45: 
46: 
47: 
48: 
49: 
50: 
51: 
52: 
53: 
54: 
55: 
56: 
57: 
58: 
59: 
60: 
61: 
62: 
63: 
64: 
65: 
66: 
67: 
68: 
69: 
70: 
71: 
72: 
73: 
74: 
75: 
76: 
77: 
78: 
79: 
80: 
81: 
82: 
83: 
84: 
85: 
86: 
87: 
88: 
89: 
90: 
91: 
92: 
93: 
94: 
95: 
96: 
97: 
98: 
99: 
100: 
101: 
102: 
103: 
104: 
105: 
106: 
107: 
108: 
109: 
110: 
111: 
112: 
113: 
114: 
115: 
116: 
117: 
118: 
119: 
120: 
121:
<?php
include("../config.inc.php");
include("../functions.inc.php");
include("login.inc.php");

session_start();
$session_name = session_name();

include("kopf.php");

switch ($action) {
 case "insert":
 for ($i = 1; $i <= 4; $i++) {
  if ($picture[$i]!="" and $picture[$i]!="none") {
   $dest = $root . $picture_directory . "/" . $picture_name[$i];
   if (!copy($picture[$i], $dest)) echo "<br>Fehler beim Dateiupload!<br>";
   $picture_array[] = array("picture" =>$picture_directory . "/" .$picture_name[$i], "description" => $description[$i]);
  }
 }
 break;
 case "delete":
  foreach ($HTTP_POST_VARS as $elem=>$k) {
  if (substr($elem,0,8)=="picture_") {
  $id= substr($elem,8);
  $file = $root . $picture_array[$id]["picture"];
  if (!unlink($file)) echo "<br>Fehler beim Löschen der Datei!<br>";
   unset($picture_array[$id]);
  }
 }
 break;
 }
 
 session_register("picture_array");

echo "<br>";

?>

<br>
<FORM ENCTYPE="multipart/form-data" ACTION="picture_upload.php?type=<?php echo $type; ?>&action=insert&sid=<?php echo $sid; ?>" METHOD="POST" name="picture">
<input type="hidden" name="picture_directory" value="<?php echo $type ?>">
<table width="98%" border="0" cellspacing="0" cellpadding="4" align="center">
 <tr valign="top">
  <td width="10%">Picture 1:</td>
  <td width="90%"><input name="picture[1]" type="FILE" size="35"></td>
 </tr>
 <tr valign="top">
  <td width="10%">Picture 2:</td>
  <td width="90%"><input name="picture[2]" type="FILE" size="35"></td>
 </tr>
 <tr valign="top">
  <td width="10%">Picture 3:</td>
  <td width="90%"><input name="picture[3]" type="FILE" size="35"></td>
 </tr>
 <tr valign="top">
  <td width="10%">Picture 4:</td>
  <td width="90%"><input name="picture[4]" type="FILE" size="35"></td>
 </tr>
 <tr>
  <td colspan="2" align="center"><input type="submit" value="Upload Picture"></td>
 </tr>
</table>
</form>

<br>

<?php
if ($picture_array) {
?>
<form name="Screens" method="post" action="picture_upload.php?type=<?php echo $type; ?>&action=delete&sid=<?php echo $sid; ?>">
<table width="98%" border="0" cellspacing="0" cellpadding="4" align="center">
 <tr bgcolor="<?php echo $c_head; ?>">
  <td width="10%">&nbsp;</td>
  <td width="50%">Datei</td>
  <td width="40%" align="left">URL</td>
 </tr>
 <?php
  reset($picture_array);
  $k=0;
  for ($i = 0; $i < count($picture_array); $i++) {
   if ($k==0) {
            $backcolor="$c_line1";
            $k=1;
   }
   else {
            $backcolor="$c_line2";
            $k=0;
   }
 ?>
   <tr bgcolor="<?php echo $backcolor; ?>">
     <td width="10%">
       <input type="checkbox" name="picture_<?php echo key($picture_array); ?>" value="kill">
     </td>
     <td width="50%">
       <a href="<?php echo $siteurl; echo $picture_array[key($picture_array)]["picture"]; ?>" class="news" target="_blank"><?php echo $picture_array[key($picture_array)]["picture"]; ?></a>
     </td>
     <td width="40%" align="left">

       <?php echo $siteurl; echo $picture_array[key($picture_array)]["picture"]; ?>
     </td>
   </tr>
   <?php
  next($picture_array);
  }
 ?>
   <tr bgcolor="<?php echo $c_head; ?>">
     <td width="10%">&nbsp;</td>
     <td width="50%">
       <input type="submit" name="button" value="Markierte Datein löschen">
     </td>
     <td width="40%">&nbsp;</td>
   </tr>
  </table>
 </form>
 <?php
  }
 ?>

<?php
include("fuss.php");
?>

Nach oben