ID: 11403
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Bogus
Bug Type: *Session related
Operating system: 
PHP Version: 4.0.4pl1
Assigned To: 
Comments:

This works:

<?
session_start();
$filename = "test.jpg";
$fd = fopen ($filename, "rb");
$contents = fread ($fd, filesize ($filename));
fclose ($fd);

Header ("Content-type: image/jpeg");
echo $contents;
?>


Previous Comments:
---------------------------------------------------------------------------

[2001-06-11 14:12:23] [EMAIL PROTECTED]
This script works as expected:
<?
$filename = "someimage.jpg";
$fd = fopen ($filename, "rb");
echo $contents = fread ($fd, filesize ($filename));
fclose ($fd);
?>

Adding sesion start sends bogus header infromation that makes IE think the file is a 
bitmap.  When right clicking on the image, IE thinks the file is of type .bmp and the 
Protocol is HTML.  Does the same thing for all image types. Adding header information 
in the script does not fix the problem, nor does setting default_mimetype to the 
"image/jpeg" in the script.

I was able to reproduce this on 4 different linux machines running 4.0.2, 4.0.4p1, and 
4.0.5

 
<?
session_start();
$filename = "someimage.jpg";
$fd = fopen ($filename, "rb");
echo $contents = fread ($fd, filesize ($filename));
fclose ($fd);
?>



---------------------------------------------------------------------------



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=11403&edit=2


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to