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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 15:01:28 2024 UTC