php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50319 stat() / lstat() does not work on a mounted cifs
Submitted: 2009-11-28 19:46 UTC Modified: 2009-11-28 20:22 UTC
From: jpope at popes dot net Assigned:
Status: Not a bug Package: Streams related
PHP Version: 5.3.1 OS: Fedora 12
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: jpope at popes dot net
New email:
PHP Version: OS:

 

 [2009-11-28 19:46 UTC] jpope at popes dot net
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)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-11-28 20:18 UTC] jani@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.


 [2009-11-28 20:22 UTC] jpope at popes dot net
The existing bug has a status of bogus, but it's not bogus!!  If there were a resolution to this issue I would have do that rather than submit a bug.

Please investigate this issue further as it is clearly not bogus.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jun 21 17:01:30 2024 UTC