|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55364 DirectoryIterator fails to list VirtualBox shared folder contents
Submitted: 2011-08-04 18:15 UTC Modified: 2011-08-16 16:24 UTC
From: bob at synapsestudios dot com Assigned:
Status: Closed Package: SPL related
PHP Version: 5.3.6 OS: Ubuntu Server "natty" 32-bit
Private report: No CVE-ID: None
 [2011-08-04 18:15 UTC] bob at synapsestudios dot com
I recently updated to 5.3.6 on a VirtualBox VM that uses a shared directory from 
my Windows 7 (64-bit) machine for project files.  I've since determined that 
DirectoryIterator fails to locate any files in the shared directory.  

Upon further inspection, it works fine for any other directory on the VM.  I've 
also confirmed that the same issue does not happen when going from a Linux machine 
to the VM leading me to believe that this is NTFS-related.

The last known working version was 5.3.3.  Version 5.3.5 had the same issues as 
the current version and I did not test on 5.3.4.

Googling found another person with the same problem: 

Test script:
<h1>DirectoryIterator Test on VirtualBox Shared Folders</h1>
// Shows files in a non-shared folder directory, change this to a real directory
$pass = new DirectoryIterator('/home/develop/web/');
foreach ($pass as $file)
// Shows nothing in a shared folder directory, change this to a real directory
$fail = new DirectoryIterator('/home/develop/web/projects/');
foreach ($fail as $file)

Expected result:
List all of the files in the shared folder directory

Actual result:
No files are found


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-08-16 08:07 UTC] vbox-dev at paul-mitchell dot me dot uk
Please upgrade to VirtualBox 4.1.2 + Guest Additions (released 2011-08-15) which 
has a fix for this issue.
 [2011-08-16 16:24 UTC] bob at synapsestudios dot com
-Status: Open +Status: Closed
 [2011-08-16 16:24 UTC] bob at synapsestudios dot com
This has been fixed by upgraded the VBox and Guest Additions as suggested (Thanks 
Paul!).  Just a note, that I was on Vbox 4.0 and was not informed of the newer 4.1 
version available.  I had to manually go to the VBox site to download the new 
 [2012-08-06 05:51 UTC] nogod dot mail at gmail dot com
This issue can be reproduced with sshfs mounted folder.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Dec 07 13:03:33 2021 UTC