php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #9581 filesystem reading functions (fread, fpassth.)
Submitted: 2001-03-06 10:26 UTC Modified: 2001-03-06 18:46 UTC
From: mot at warpturbine dot net Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.0.4pl1 OS: win98se
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mot at warpturbine dot net
New email:
PHP Version: OS:

 

 [2001-03-06 10:26 UTC] mot at warpturbine dot net
while running php as an apache module (not cgi-mode) the filesystem functions of php fread and fpassthrough are not reading the complete file. it skips reading after a number of bytes.

i'm not an apache crack that's why i can't say if this belongs to my apache distro (1.3.12) or not. but i don't think so.

running in cgi-mode will avoid this problem.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-06 12:04 UTC] sniper@php.net
You propably missed the 'b' in your fopen()  call?

ie. you should use this in Windows:

$fp = fopen ("/home/rasmus/file.gif", "rb");

instead of just 'r'. 

--Jani

 [2001-03-06 12:35 UTC] mot at warpturbine dot net
hi jani - that is another way to solve the problem.

in documentation, it's said, that fread is binary safe. so this is a documentation problem.

for the people programming the software it might be good to know, that it only happens in the apache module, not in the cgi-mode.

thanks for your comments.

--mot
 [2001-03-06 18:46 UTC] sniper@php.net
Fixed in documentation CVS. I added an note into fread() docs about
the fact that file must be opened with 'b' on Windows.

--Jani

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 06 10:01:29 2025 UTC