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
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: tcmleung at yahoo dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 05:01:38 2025 UTC