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 this is not your bug, you can add a comment by following this link.
If this is your bug, but 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

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-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 20:01:29 2024 UTC