Bug #11403 Updated: calling session_start with protected images sends bogus headers

From: Date: Wed, 20 Jun 2001 02:28:30 +0000
Subject: Bug #11403 Updated: calling session_start with protected images sends bogus headers
Groups: php.dev 
Request: Send a blank email to php-dev+get-57314@lists.php.net to get a copy of this message
ID: 11403 Updated by: sniper Reported By: bondu@iowalab.com Old-Status: Bogus Status: Closed Bug Type: *Session related Operating system: PHP Version: 4.0.4pl1 Assigned To: Comments: Just a note, this is problem only with IE. Seems like it doesn't like all the cache preventing headers sent by session_start() but using 'private' cache headers, it works. Go figure.. Previous Comments: --------------------------------------------------------------------------- [2001-06-19 15:03:13] bondu@iowalab.com adding session_cache_limiter("private"); before session_start(); fixed the problem. <? session_cache_limiter("private"); session_start(); $filename = "test.jpg"; $fd = fopen ($filename, "rb"); $contents = fread ($fd, filesize ($filename)); fclose ($fd); Header ("Content-type: image/jpeg"); echo $contents; ?> --------------------------------------------------------------------------- [2001-06-19 12:44:33] sniper@php.net And update to php 4.0.5 --------------------------------------------------------------------------- [2001-06-19 12:43:43] sniper@php.net 1. I am NOT using IE here. I tested this with IE now, and it works just fine. 2. Works also with Opera. 3. Works also with Mozilla. I suggest you check your php.ini settings. --------------------------------------------------------------------------- [2001-06-12 13:08:48] bondu@iowalab.com adding Header ("Content-type: image/jpeg"); does NOT fix the problem. copy the "fixed" script to a new file name, and see that it does not work. you are looking at cached version. IE will cache the mimetype info associated with the image even if you clear your history. I am able to reproduce this consistantly on multiple machines --------------------------------------------------------------------------- [2001-06-12 01:45:23] sniper@php.net 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; ?> --------------------------------------------------------------------------- The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online. ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=11403&edit=2

« previous php.dev (#57314) next »