Bug #53061 [NEW]: filesystem functions deal poorly with out of disk space conditions

From: Date: Thu, 14 Oct 2010 04:35:12 +0000
Subject: Bug #53061 [NEW]: filesystem functions deal poorly with out of disk space conditions
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-155163@lists.php.net to get a copy of this message
From:             
Operating system: *nix
PHP version:      5.3SVN-2010-10-14 (SVN)
Package:          Filesystem function related
Bug Type:         Bug
Bug description:filesystem functions deal poorly with out of disk space conditions

Description:
------------
Filesystem functions have IMHO the wrong behaviuor on disk-full conditions

Test script:
---------------
<?php

$fp = fopen('/dev/full', 'wb');
var_dump(fwrite($fp, "fail"));
var_dump(fflush($fp));
var_dump(fclose($fp));

Expected result:
----------------
bool(false) and "warning ...No space left on device.. (aka, handle ENOSPC)
bool(false)
bool(true)

Actual result:
--------------
int(0)
bool(true)
bool(true)


-- 
Edit bug report at http://bugs.php.net/bug.php?id=53061&edit=1
-- 
Try a snapshot (PHP 5.2):            http://bugs.php.net/fix.php?id=53061&r=trysnapshot52
Try a snapshot (PHP 5.3):            http://bugs.php.net/fix.php?id=53061&r=trysnapshot53
Try a snapshot (trunk):              http://bugs.php.net/fix.php?id=53061&r=trysnapshottrunk
Fixed in SVN:                        http://bugs.php.net/fix.php?id=53061&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53061&r=needdocs
Fixed in release:                    http://bugs.php.net/fix.php?id=53061&r=alreadyfixed
Need backtrace:                      http://bugs.php.net/fix.php?id=53061&r=needtrace
Need Reproduce Script:               http://bugs.php.net/fix.php?id=53061&r=needscript
Try newer version:                   http://bugs.php.net/fix.php?id=53061&r=oldversion
Not developer issue:                 http://bugs.php.net/fix.php?id=53061&r=support
Expected behavior:                   http://bugs.php.net/fix.php?id=53061&r=notwrong
Not enough info:                     http://bugs.php.net/fix.php?id=53061&r=notenoughinfo
Submitted twice:                     http://bugs.php.net/fix.php?id=53061&r=submittedtwice
register_globals:                    http://bugs.php.net/fix.php?id=53061&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=53061&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=53061&r=dst
IIS Stability:                       http://bugs.php.net/fix.php?id=53061&r=isapi
Install GNU Sed:                     http://bugs.php.net/fix.php?id=53061&r=gnused
Floating point limitations:          http://bugs.php.net/fix.php?id=53061&r=float
No Zend Extensions:                  http://bugs.php.net/fix.php?id=53061&r=nozend
MySQL Configuration Error:           http://bugs.php.net/fix.php?id=53061&r=mysqlcfg



Thread (5 messages)

« previous php.bugs (#155163) next »