Bug #18137: output not working properly?
| From: | loe at loe dot at | Date: | Wed, 03 Jul 2002 11:50:15 +0000 |
| Subject: | Bug #18137: output not working properly? | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-12968@lists.php.net to get a copy of this message | ||
From: loe@loe.at
Operating system: Linux/ Windows
PHP version: 4.2.1
PHP Bug Type: Output Control
Bug description: output not working properly?
I try to read in a .jpeg and output it via echo
(smtg. like:
$Filename = "uk.jpg";
if( $hFile = fopen($Filename, "rb"))
{
$Filesize = filesize($Filename);
header("Content-name: ".$Filename);
header("Content-type: image/jpeg");
header("Content-length: ".$Filesize);
$Data = fread($hFile, $Filesize);
echo $Data;
}
I also thries readfile, does not work either.
It seems to work und Windows For Files up to 40K, and under Linux for
files up to 180k, but I am not sure if it is related to the filesize or to
the filecontent.
I tried serveral newsgroups, nut this seems to be a bug (and noone could
help...).
Same problem exists in 4.2.0
Apache version is 2.0.39
I tried to track it down in the source, but the problem i snot obiuous. I
check up to sapi_apache_ub_write and the code seems to be correct (I did
no debuging, time is short now...). But I could not find the rwrite
function (Apache API obviously...)
Regards & tnx in advance, Mario Löfler
--
Edit bug report at http://bugs.php.net/?id=18137&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=18137&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=18137&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=18137&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=18137&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=18137&r=support
Expected behavior: http://bugs.php.net/fix.php?id=18137&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=18137&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=18137&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=18137&r=globals