Re: FilesystemIterator issue with smb/cifs mounts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/28/2012 9:32 AM, Kris Spencer wrote:
> I am writing a simple file system iterator which seems to work fine on
> local filesystems but methods such as FilesystemIterator::isDir and
> isFile fail to properly evaluate if the directory are smb/cifs mounted.
>  Does anyone know a workaround or alternative?
>
> Thanks
Just an update to my own post since I did not get any response.  After
more digging, I found a solution and thought I should share it in case
anyone else has a similar issue.

The solution was to add the noserverino option to my mount command.  Now
FilesystemIterator::isDir, isFile (and probably other similar PHP
functions) correctly report the expected response.

example:
# mount -t smbfs "//192.168.1.2/my/folder" /mount -o noserverino,user=me

references:
original point to solution:
    http://web.archiveorange.com/archive/v/WEFLnZlDdIdO5Jl7wies
view comment 1 for detailed explanation of cause:
    https://bugzilla.samba.org/show_bug.cgi?id=7707

see also "not a php bug":
https://bugs.php.net/bug.php?id=51404
https://bugs.php.net/bug.php?id=51266

Hope this helps someone out there in the future.

Regards

Kris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux