IGNORE THIS POST
Changing the CHMOD in general Joomla config to 644 did the trick.
I am a happy man !
--------
Hello,
Using
VM 1.0.13a
Joomla 1.0
PHP 5
I have searched different forums in order to get a response to this one.
I am adding products to my shop.. no problem so far
Adding a picture is also ok , but is not visible on frontend.
VM changed the filename to a hashkey file, which I understand, but it isnn't visible !
I have tried following items :
CHMOD the directory and files to 777 or 655 as advised in a topic : NO RESULT
changed in the MYsql table vm_product_table. There I changed the thumb image and big image file to a normal file name : NO RESULT
I also checked the content of show_image_in_imgtag.php (because that file came up a lot in forum topics).
to my knowledge everything seems ok
I quote the php just to be sure :
define('_VALID_MOS', 1);
include_once("../../configuration.php");
include_once("../../administrator/components/com_virtuemart/virtuemart.cfg.php");
// Image2Thumbnail - Klasse einbinden
include( CLASSPATH . "class.img2thumb.php");
$basefilename = @basename(urldecode($_REQUEST['filename']));
$filename = IMAGEPATH."product/".$basefilename;
$filename2 = IMAGEPATH."product/resized/".$basefilename;
$newxsize = @$_REQUEST['newxsize'];
$newysize = @$_REQUEST['newysize'];
$maxsize = false;
$bgred = 255;
$bggreen = 255;
$bgblue = 255;
/*
if( !isset($fileout) )
$fileout="";
if( !isset($maxsize) )
$maxsize=0;
*/
/* Minimum security */
if( !file_exists( $filename ) && !file_exists( $filename2 )) {
die('File does not exist');
}
$fileinfo = pathinfo( $filename );
$file = str_replace(".".$fileinfo['extension'], "", $fileinfo['basename']);
// In class.img2thumb in the function NewImgShow() the extension .jpg will be added to .gif if imagegif does not exist.
// If the image is a gif, and imagegif() returns false then make the extension ".gif.jpg"
if( $fileinfo['extension'] == "gif") {
if( function_exists("imagegif") ) {
$ext = ".".$fileinfo['extension'];
$noimgif="";
}
else {
$ext = ".jpg";
$noimgif = ".".$fileinfo['extension'];
}
}
else {
$ext = ".".$fileinfo['extension'];
$noimgif="";
}
if( file_exists($filename2)) {
$fileout = $filename2;
} else {
$fileout = IMAGEPATH."/product/resized/".$file."_".PSHOP_IMG_WIDTH."x".PSHOP_IMG_HEIGHT.$noimgif.$ext;
}
// Tell the user agent to cache this script/stylesheet for an hour
$age = 3600;
header( 'Expires: '.gmdate( 'D, d M Y H:i:s', time()+ $age ) . ' GMT' );
header( 'Cache-Control: max-age='.$age.', must-revalidate' );
if( file_exists( $fileout ) ) {
/* We already have a resized image
* So send the file to the browser */
switch($ext)
{
case ".gif":
header ("Content-type: image/gif");
readfile($fileout);
break;
case ".jpg":
header ("Content-type: image/jpeg");
readfile($fileout);
break;
case ".png":
header ("Content-type: image/png");
readfile($fileout);
break;
}
}
else {
/* We need to resize the image and Save the new one (all done in the constructor) */
$neu = new Img2Thumb($filename,$newxsize,$newysize,$fileout,$maxsize,$bgred,$bggreen,$bgblue);
/* Send the file to the browser */
switch($ext)
{
case ".gif":
header ("Content-type: image/gif");
readfile($fileout);
break;
case ".jpg":
header ("Content-type: image/jpeg");
readfile($fileout);
break;
case ".png":
header ("Content-type: image/png");
readfile($fileout);
break;
}
}
?>
I hope you can all help me out.
How display the images on the frontend ?