php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16432 fwrite fails on long text string
Submitted: 2002-04-04 13:28 UTC Modified: 2002-05-05 00:00 UTC
Votes:8
Avg. Score:4.0 ± 1.3
Reproduced:6 of 6 (100.0%)
Same Version:2 (33.3%)
Same OS:4 (66.7%)
From: nielsene at mit dot edu Assigned:
Status: No Feedback Package: Filesystem function related
PHP Version: 4.1.2 OS: Linux 2.2.18
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2002-04-04 13:28 UTC] nielsene at mit dot edu
fwrite appears to fail when the input string is too long (on the order of 160k).  

I've been creating dynamic stats pages from a database and writing them to a file.  Recently the text to write has exceed some threshold that caused fwrite to not write to the fill and to not return an error code.  Writing the files in chunks fixes the problem.  However, there is nothing in the documentation about max length of strings to write.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-04 13:44 UTC] sander@php.net
Can't reproduce. Just wrote about 300 megs in one call :)
I'm runnig Linux 2.4.17.

Can you try 4.2.0RC2 from www.php.net/~derick ?
 [2002-04-04 13:47 UTC] nielsene at mit dot edu
I can't install the RC on the server right now (its a production machine and my dev is currently under repair).

If its not easily reproduceable, I guess don't worry about it, the workaround for me isn't that hard.
 [2002-04-30 16:21 UTC] mark at tapinternet dot com
Happens here on exactly 4k.  chops off at 4096 bytes regardless of the last parameter.  PHP 4.1.2
 [2002-05-05 00:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC