To be more specific:
I call a script called display.php like this:
echo "<img src='fopen.php?image_id=$image_id&imagename=$imagename&owner=$owner'>";
display.php looks like this:
<?
include ("mvariables.php");
$filename= "$homedir/$imagesdir/$owner/$album_id/$imagename";
header( "Content-type: image/jpeg\nContent-Disposition: inline;filename=\"mypic.jpg\"\nContent-length:".(string)(filesize($filename)) );
$fp=fopen($filename, "rb");
fpassthru($fp);
flush();
?>
... which doesn't work, a broken image with the rights size is displayed.
If I change display.php to
<?
include ("mvariables.php");
$filename= "$homedir/$imagesdir/$owner/$album_id/$imagename";
$filename= "/home/user19/images/admin/1/1.jpg"; // string constant contain complete path to img file
header( "Content-type: image/jpeg\nContent-Disposition: inline;filename=\"mypic.jpg\"\nContent-length:".(string)(filesize($filename)) );
$fp=fopen($filename, "rb");
fpassthru($fp);
flush();
?>
I get the image displayed properly.
Any ideas? Obviously the path to the image is correct, or the browser wouldn't know the size...