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
Have you experienced this issue?
Rate the importance of this bug to you:

 [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

Add a Patch

Pull Requests

Add a Pull Request

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: Thu Mar 28 21:01:27 2024 UTC