php.net |  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bob at synapsestudios dot com
New email:
PHP Version: OS:

 

 [2011-08-04 18:15 UTC] bob at synapsestudios dot com
Description:
------------
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: 
http://www.searbe.co.uk/phpunit-and-virtualbox-uncaught-exception-php 

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

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

Actual result:
--------------
No files are found

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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 
version.
 [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 19:03:40 2021 UTC