From:             jpope at popes dot net
Operating system: Fedora 12
PHP version:      5.3.1
PHP Bug Type:     Streams related
Bug description:  stat() / lstat() does not work on a mounted cifs

Description:
------------
stat() and lstat() functions fail when passed a file that is on a CIFS
mounted file system.  This issue is the same as bug #50150.

Reproduce code:
---------------
#!/usr/bin/php
<?php
    $dirtoopen="/mnt/images/";
    $dir = opendir($dirtoopen);
    if($dir)
    {
        if($file = readdir($dir))
        {
                var_dump(stat("$dirtoopen$file"));
        }
        closedir($dir);
    }
    else
    {
        echo "Can't open dir  \"$dirtoopen\"\n";
    }
?>


Expected result:
----------------
array(26) {
  [0]=>
  int(64768)
  [1]=>
  int(11)
  [2]=>
  int(16832)
  [3]=>
  int(2)
  [4]=>
  int(0)
  [5]=>
  int(0)
  [6]=>
  int(0)
  [7]=>
  int(16384)
  [8]=>
  int(1259424478)
  [9]=>
  int(1188876522)
  [10]=>
  int(1227920384)
  [11]=>
  int(4096)
  [12]=>
  int(40)
  ["dev"]=>
  int(64768)
  ["ino"]=>
  int(11)
  ["mode"]=>
  int(16832)
  ["nlink"]=>
  int(2)
  ["uid"]=>
  int(0)
  ["gid"]=>
  int(0)
  ["rdev"]=>
  int(0)
  ["size"]=>
  int(16384)
  ["atime"]=>
  int(1259424478)
  ["mtime"]=>
  int(1188876522)
  ["ctime"]=>
  int(1227920384)
  ["blksize"]=>
  int(4096)
  ["blocks"]=>
  int(40)
}


Actual result:
--------------
PHP Warning:  stat(): stat failed for /mnt/images/. in /root/x on line 9
bool(false)


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

Reply via email to