php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18137 output not working properly?
Submitted: 2002-07-03 07:50 UTC Modified: 2002-11-21 17:08 UTC
From: loe at loe dot at Assigned:
Status: No Feedback Package: Apache2 related
PHP Version: 4.2.1 OS: Linux/ Windows
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: loe at loe dot at
New email:
PHP Version: OS:

 

 [2002-07-03 07:50 UTC] loe at loe dot at
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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-03 08:09 UTC] sander@php.net
Dupe of #17885. This is an Apache2 problem.
 [2002-11-10 18:33 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


 [2002-11-21 17:08 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC