Problem mit anpeasstem Bildmodul

Gesperrt
Neverlands
Beiträge: 45
Registriert: Mo 20. Sep 2004, 14:56
Wohnort: Wien
Kontaktdaten:

Problem mit anpeasstem Bildmodul

Beitrag von Neverlands »

Hallo Ihr,

ich habe wieder einmal ein Problem am neuen Server (Linux, Apache, MySQL, Contenido 4.6.8.5).

Hier der Code:

Input:

Code: Alles auswählen

/**
* CONTENIDO MODUL - INPUT
*
* Artikelliste speziell für Artefakte(Bilder)
*
* Erstellt eine Liste mit allen Artikel.
*
* Author Karsten Flache
* www.mystportal.com
*/

include_once ($contenido_path . "external/tools/functions_filelist.php");

echo "<table cellspacing=\"0\" cellpadding=\"10\" border=\"0\">
        <tr valign=\"top\">
          <td><font size=\"2\">Upload-Pfad wählen:</font></td>
          <td>
            <select name=\"CMS_VAR[0]\">
            ".lfl_diroptlist($client, "CMS_VALUE[0]")."</select><font size=\"2\">
            </font>
         </td>
        </tr>
         <tr>
          <td><font size=\"2\">Thumbnail</font></td>
          <td><font size=\"2\">Breite:</font><input type=\"text\" name=\"CMS_VAR[1]\" value=\"CMS_VALUE[1]\" size=\"20\"></td>
          <td><font size=\"2\">Höhe:</font><input type=\"text\" name=\"CMS_VAR[2]\" value=\"CMS_VALUE[2]\" size=\"20\"></td>
          <td><font size=\"2\">Compression:</font><input type=\"text\" name=\"CMS_VAR[3]\" value=\"CMS_VALUE[3]\" size=\"20\"></td>
        </tr>
        </table>";
Output:

Code: Alles auswählen

<?php
/***********************************************
* CONTENIDO MODUL - OUTPUT
*
* Bildergallery
*
* Erstellt eine Liste mit allen Artikel.
*
* Author Karsten Flache
* www.mystportal.com
************************************************/
// selected category

$selupload = "CMS_VALUE[0]"; 
$imgWidth="CMS_VALUE[1]";
$imgHeight="CMS_VALUE[2]";
$imgComp="CMS_VALUE[3]";
/*
$selupload = "Links/"; 
$imgWidth="50";
$imgHeight="50";
$imgComp="0";
*/

//hole Hole physischen- und html-Pfad des Mandanten
$sql = "SELECT * FROM ".$cfg["tab"]["clients"]." WHERE idclient = '$load_client'";
$db->query($sql);
$db->next_record();
$mandant_path= $db->f("frontendpath");
$mandant_html= $db->f("htmlpath");

echo "\n<!-- Bildergallerie Anfang -->";
echo "\n<div class=\"bgRahmen\">";
if ($selupload!="")
{
	//hole Bilder und Beschreibung aus Upload-Pfad
	$sql = "SELECT filename, description FROM ".$cfg["tab"]["upl"]." WHERE dirname = '$selupload' and idclient=$client";
	$db->query($sql);
    while ($db->next_record()) 
	{
      $bildFilename[] = $db->f("filename");
      $bildDescription[] = $db->f("description");
    }
	
	if (is_array($bildFilename)) 
	{ 	// es wurde mindestens ein Bild gefunden
	
		// für jedes gefundene Bild
		foreach ($bildFilename as $key => $value) 
		{
			//hole Bild-Pfad
			$imgpath=$mandant_path."upload/".$selupload;
			$imghtml=$mandant_html."upload/".$selupload;
			$imgfile=$value;
			
			//Überprüfe ob Thumbnail existiert, wenn nicht lege es an
			$thumbfile=capiImgScaleHQ (str_replace(' ','%20',"upload/$selupload$value"), $imgWidth, $imgHeight, $crop = false, $expand = false, $cacheTime = 1440);
			//hole Bild-Beschreibung
			$imgdesc= $bildDescription[$key];
			
			//Bildgröße
			$image= $imghtml.$imgfile;
			$image = str_replace(' ','%20',$image); //GetImageSize hat bug wenn in url Leerzeichen stehen
			$imgSize=getimagesize($image);
			//Thumbgröße
			$imageThumb= $thumbfile;
			$imageThumb = str_replace(' ','%20',$imageThumb); //GetImageSize hat bug wenn in url Leerzeichen stehen
			$imgSizeThumb=getimagesize($imageThumb);
			//Bildlink
			$img = "<a href=\"javascript:iZoom('$image',$imgSize[0],$imgSize[1])\"><img src=\"$thumbfile\" border=\"0\" height=\"".$imgSizeThumb[1]."\" width=\"".$imgSizeThumb[0]."\"></a>";

			echo "\n\t<div class=\"bgBildRahmen\">";
			echo "\n\t\t<div class=\"bgBildDescription\">".urldecode($imgdesc)."</div>";
			echo "\n\t\t<div class=\"bgBildSize\">$imgSize[0] x $imgSize[1]</div>";
			echo "\n\t\t<div class=\"bgBildImage\">$img</div>";
			echo "\n\t</div>";
		}
	}
}
echo "\n\t<div class=\"AntiFloat\"></div>";
echo "\n</div>";
echo "\n<!-- Bildergallerie Ende -->";
?>
Resultiert in folgenden Fehler:

Warning: getimagesize(http://195.203.153.92/cobas/upload/Bild ... twurf2.jpg) [function.getimagesize]: failed to open stream: Connection timed out in /var/www/www.cobas.at/contenido/cobas/front_content.php(792) : eval()'d code on line 1475

Warning: getimagesize(http://195.203.153.92/cobas/cache/b9d2c ... 22c4b2.jpg) [function.getimagesize]: failed to open stream: Connection timed out in /var/www/www.cobas.at/contenido/cobas/front_content.php(792) : eval()'d code on line 1479

Das Bild wird korrekt in den Cache geschrieben, aber dann geht es nicht weiter...

Hat jemand einen Rat?

Liebe Grüße,
Neverlands
emergence
Beiträge: 10653
Registriert: Mo 28. Jul 2003, 12:49
Wohnort: Austria
Kontaktdaten:

Beitrag von emergence »

*** make your own tools (wishlist :: thx)
Neverlands
Beiträge: 45
Registriert: Mo 20. Sep 2004, 14:56
Wohnort: Wien
Kontaktdaten:

Beitrag von Neverlands »

Vielen Dank emergence!
Ich hatte zwar den Beitrag von HerrB schon zuvor gefunden und auch ausprobiert, aber ich hatte mich wohl verschrieben.
Jetzt klappt es bestens :)

Liebe Grüße,
Neverlands
Gesperrt