Hi,
ich bekomm folgende Fehler, wenn ich auf meinem Server versuche Bilder hochzuladen:
Warning: getimagesize(): open_basedir restriction in effect. File(/tmp/phpeMlfQ8) is not within the allowed path(s): (/home/www/web14/) in /home/www/web14/html/g4a/acp/img_save.php on line 16
Warning: getimagesize(/tmp/phpeMlfQ8): failed to open stream: Operation not permitted in /home/www/web14/html/g4a/acp/img_save.php on line 16
Warning: Division by zero in /home/www/web14/html/g4a/acp/img_save.php on line 20
Warning: imagecreatefromjpeg(): open_basedir restriction in effect. File(/tmp/phpeMlfQ8) is not within the allowed path(s): (/home/www/web14/) in /home/www/web14/html/g4a/acp/img_save.php on line 23
Warning: imagecreatefromjpeg(/tmp/phpeMlfQ8): failed to open stream: Operation not permitted in /home/www/web14/html/g4a/acp/img_save.php on line 23
Warning: imagecreatetruecolor(): Invalid image dimensions in /home/www/web14/html/g4a/acp/img_save.php on line 24
Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /home/www/web14/html/g4a/acp/img_save.php on line 25
Warning: imagejpeg(): supplied argument is not a valid Image resource in /home/www/web14/html/g4a/acp/img_save.php on line 26
Warning: filesize(): Stat failed for hr7.jpg (errno=2 - No such file or directory) in /home/www/web14/html/g4a/acp/img_save.php on line 28
Fehler beim Speichern!
Warning: getimagesize(): open_basedir restriction in effect. File(/tmp/phpeMlfQ8) is not within the allowed path(s): (/home/www/web14/) in /home/www/web14/html/g4a/acp/img_save.php on line 40
Warning: getimagesize(/tmp/phpeMlfQ8): failed to open stream: Operation not permitted in /home/www/web14/html/g4a/acp/img_save.php on line 40
Warning: Division by zero in /home/www/web14/html/g4a/acp/img_save.php on line 44
Warning: imagecreatefromjpeg(): open_basedir restriction in effect. File(/tmp/phpeMlfQ8) is not within the allowed path(s): (/home/www/web14/) in /home/www/web14/html/g4a/acp/img_save.php on line 47
Warning: imagecreatefromjpeg(/tmp/phpeMlfQ8): failed to open stream: Operation not permitted in /home/www/web14/html/g4a/acp/img_save.php on line 47
Warning: imagecreatetruecolor(): Invalid image dimensions in /home/www/web14/html/g4a/acp/img_save.php on line 48
Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /home/www/web14/html/g4a/acp/img_save.php on line 49
Warning: imagejpeg(): supplied argument is not a valid Image resource in /home/www/web14/html/g4a/acp/img_save.php on line 50
Warning: filesize(): Stat failed for hr7_thumb.jpg (errno=2 - No such file or directory) in /home/www/web14/html/g4a/acp/img_save.php on line 52
Fehler beim Speichern des thumb!
-------------------------------------------
Auf'm localhost funktioniert es einwandfrei! Deswegen kann es kein Script-Fehler sein! Aber hier mal die Datei:
Wo ist der Fehler? Ich hab doch die Rechte 777 gesetzt!
ich bekomm folgende Fehler, wenn ich auf meinem Server versuche Bilder hochzuladen:
Warning: getimagesize(): open_basedir restriction in effect. File(/tmp/phpeMlfQ8) is not within the allowed path(s): (/home/www/web14/) in /home/www/web14/html/g4a/acp/img_save.php on line 16
Warning: getimagesize(/tmp/phpeMlfQ8): failed to open stream: Operation not permitted in /home/www/web14/html/g4a/acp/img_save.php on line 16
Warning: Division by zero in /home/www/web14/html/g4a/acp/img_save.php on line 20
Warning: imagecreatefromjpeg(): open_basedir restriction in effect. File(/tmp/phpeMlfQ8) is not within the allowed path(s): (/home/www/web14/) in /home/www/web14/html/g4a/acp/img_save.php on line 23
Warning: imagecreatefromjpeg(/tmp/phpeMlfQ8): failed to open stream: Operation not permitted in /home/www/web14/html/g4a/acp/img_save.php on line 23
Warning: imagecreatetruecolor(): Invalid image dimensions in /home/www/web14/html/g4a/acp/img_save.php on line 24
Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /home/www/web14/html/g4a/acp/img_save.php on line 25
Warning: imagejpeg(): supplied argument is not a valid Image resource in /home/www/web14/html/g4a/acp/img_save.php on line 26
Warning: filesize(): Stat failed for hr7.jpg (errno=2 - No such file or directory) in /home/www/web14/html/g4a/acp/img_save.php on line 28
Fehler beim Speichern!
Warning: getimagesize(): open_basedir restriction in effect. File(/tmp/phpeMlfQ8) is not within the allowed path(s): (/home/www/web14/) in /home/www/web14/html/g4a/acp/img_save.php on line 40
Warning: getimagesize(/tmp/phpeMlfQ8): failed to open stream: Operation not permitted in /home/www/web14/html/g4a/acp/img_save.php on line 40
Warning: Division by zero in /home/www/web14/html/g4a/acp/img_save.php on line 44
Warning: imagecreatefromjpeg(): open_basedir restriction in effect. File(/tmp/phpeMlfQ8) is not within the allowed path(s): (/home/www/web14/) in /home/www/web14/html/g4a/acp/img_save.php on line 47
Warning: imagecreatefromjpeg(/tmp/phpeMlfQ8): failed to open stream: Operation not permitted in /home/www/web14/html/g4a/acp/img_save.php on line 47
Warning: imagecreatetruecolor(): Invalid image dimensions in /home/www/web14/html/g4a/acp/img_save.php on line 48
Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /home/www/web14/html/g4a/acp/img_save.php on line 49
Warning: imagejpeg(): supplied argument is not a valid Image resource in /home/www/web14/html/g4a/acp/img_save.php on line 50
Warning: filesize(): Stat failed for hr7_thumb.jpg (errno=2 - No such file or directory) in /home/www/web14/html/g4a/acp/img_save.php on line 52
Fehler beim Speichern des thumb!
-------------------------------------------
Auf'm localhost funktioniert es einwandfrei! Deswegen kann es kein Script-Fehler sein! Aber hier mal die Datei:
PHP-Code:
<?php
global $x,$bild_zeigen_gross,$bild_zeigen_thumb;
$kompress=100;
$pfad = '../images/bilder/';
if (!empty($_FILES[$x.'datei']['name']))
{
$teil = explode(".",$_FILES[$x.'datei']['name']);
$extens = $teil[1];
$extens =strtolower($extens);
if ($extens != "jpeg" and $extens !="jpg") { echo "<br>Bilddateien sind nur mit den Formaten \"jpg\" und \"jpeg\" zulässig!"; exit();}
$orisize = round($_FILES[$x.'datei']['size']/1024,1);
echo "Grösse der Originaldatei ".$_FILES[$x.'datei']['name'].": $orisize kb<br>";
$sourcefile = $_FILES[$x.'datei']['tmp_name'];
$picsize = getimagesize($sourcefile);
$source_x = $picsize[0];
$source_y = $picsize[1];
if ($source_x == $breite OR $breite == '') {$dest_x = $source_x;} else {$dest_x = $breite;}
$dest_y = ceil($source_y * $dest_x / $source_x);
$targetfile = $neuer_name.".jpg";
$source_id = imageCreateFromJPEG($sourcefile);
$target_id = imagecreatetruecolor($dest_x, $dest_y);
$target_pic = imagecopyresampled($target_id,$source_id,0,0,0,0,$dest_x,$dest_y,$source_x,$source_y);
$speichern = imagejpeg($target_id,$pfad.$targetfile,$kompress);
$fs = filesize($pfad.$neuer_name.".jpg");
$fs = round($fs/1024,1);
if ($speichern)
{echo "$bild_name als <b>".$neuer_name.".jpg</b> gespeichert - Dateigrösse: ".$fs." kb<br>"; }
else
{echo "Fehler beim Speichern!<br>";}
// thumnail erstellen
$kompress=100;
$sourcefile = $_FILES[$x.'datei']['tmp_name'];
$picsize = getimagesize($sourcefile);
$source_x = $picsize[0];
$source_y = $picsize[1];
$dest_x = $breite_thumb;
$dest_y = ceil($source_y * $dest_x / $source_x);
$targetfile = $neuer_name."_thumb.jpg";
$source_id = imageCreateFromJPEG($sourcefile);
$target_id = imagecreatetruecolor($dest_x, $dest_y);
$target_pic = imagecopyresampled($target_id,$source_id,0,0,0,0,$dest_x,$dest_y,$source_x,$source_y);
$speichern = imagejpeg($target_id,$pfad.$targetfile,$kompress);
$fs = filesize($pfad.$neuer_name."_thumb.jpg");
$fs = round($fs/1024,1);
if ($speichern)
{
echo "$bild_name als <b>".$neuer_name."_thumb.jpg</b> gespeichert - Dateigrösse: ".$fs." kb<br><br>";
$bild_zeigen_thumb = $neuer_name."_thumb.jpg";
$bild_zeigen_gross = $neuer_name.".jpg";
echo "<a href='$pfad$bild_zeigen_gross' target='_blank'><img src='$pfad$bild_zeigen_thumb' border='1' alt='Grosses Bild'></a> Klicken für grosses Bild!";
}
else
{echo "Fehler beim Speichern des thumb!<br><br>";}
}
else
{
echo "<p>Kein Bild ausgewählt!</p>";
}
?>
Kommentar