#41798 [NEW]: stat() gives -1 for value of [blocks] on windows for a valid input file.

From: Date: Mon, 25 Jun 2007 11:15:46 +0000
Subject: #41798 [NEW]: stat() gives -1 for value of [blocks] on windows for a valid input file.
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-114149@lists.php.net to get a copy of this message
From: nikhil dot gupta at in dot ibm dot com Operating system: Windows PHP version: 5CVS-2007-06-25 (snap) PHP Bug Type: Filesystem function related Bug description: stat() gives -1 for value of [blocks] on windows for a valid input file. Description: ------------ Using stat() function on a valid file on Windows operating system , gives -1 for [blocks] member of the array returned by stat() function. On linux it outputs proper value. In the documentation, it is mentioned that [rdev] and [blksize] members of the array returned by stat() function will output -1 on Windows operating function. I doubt, whether same will be applicable for [blocks] also? If yes, then documentation might need the change. Reproduce code: --------------- <?php $stat_array = stat(__FILE__); var_dump( $stat_array[12] ); var_dump( $stat_array['blocks'] ); ?> Expected result: ---------------- int(%d) int(%d) Actual result: -------------- int(-1) int(-1) -- Edit bug report at http://bugs.php.net/?id=41798&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41798&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41798&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41798&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41798&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41798&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41798&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=41798&r=needscript Try newer version: http://bugs.php.net/fix.php?id=41798&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41798&r=support Expected behavior: http://bugs.php.net/fix.php?id=41798&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41798&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41798&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41798&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41798&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41798&r=dst IIS Stability: http://bugs.php.net/fix.php?id=41798&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41798&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41798&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41798&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=41798&r=mysqlcfg

« previous php.bugs (#114149) next »