|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10069 fread() / fputs() error with apache modules
Submitted: 2001-03-29 21:13 UTC Modified: 2001-03-30 10:25 UTC
From: chouyu at ithow dot com Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.0.4pl1 OS: Windows NT 5.0 build 2195(Window
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
43 - 34 = ?
Subscribe to this entry?

 [2001-03-29 21:13 UTC] chouyu at ithow dot com
When I run PHP 4.0.4pl1 as apache module on my Windows 2000 ADV Server, I got the problem.
When I fread() from a binary file, or fputs() a binary string to a file, the file not same as my data.
The "0x0a" expanded to "0x0d0a", I don't know why.
I try it by CGI PHP and PHP command line on same system, them ok.

My PHP 4.0.4pl1 Win32 Binary was download from
php.ini just changed some from php.ini-dist:
short_open_tag = off
max_execution_time = 120
session.cache_limiter     =private


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-30 10:25 UTC]
add the letter 'b' to your fopen argument string
to enforce binary mode on DOS-based systems
(it doesn't harm on unix systems)
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Sep 22 22:01:24 2023 UTC