php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15594 fwrite doesn't prompt error when no disk space
Submitted: 2002-02-17 22:54 UTC Modified: 2002-07-02 16:33 UTC
From: tcmleung at yahoo dot com Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 4.1.0 OS: Linux
Private report: No CVE-ID: None
 [2002-02-17 22:54 UTC] tcmleung at yahoo dot com
The following code should be run in Linux and the harddisk or disk partition has no much space.
Code:
  $fp = fopen("abc.txt","w");
  fwrite($fp,"abcdefg");
  fclose($fp);

After running the code, the file "abc.txt" is created but with 0 bytes.(No content in the file). The fwrite function should return 0 if it cannot write anything on the file.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-02 16:33 UTC] sterling@php.net
not a bug... fwrite returns the bytes written to the buffer, this doesn't actually reflect the bytes written to disk... If you have a problem with this, talk to the UNIX people :)
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Jun 24 08:01:23 2021 UTC