Bug #54256 [Com]: DirectoryIterator isn't iterable with a foreach
| From: | andergmartins at gmail dot com | Date: | Mon, 11 Nov 2013 21:34:23 +0000 |
| Subject: | Bug #54256 [Com]: DirectoryIterator isn't iterable with a foreach | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-182710@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=54256&edit=1
ID: 54256
Comment by: andergmartins at gmail dot com
Reported by: gege2061 at homecomputing dot fr
Summary: DirectoryIterator isn't iterable with a foreach
Status: No Feedback
Type: Bug
Package: SPL related
Operating System: Debian unstable
PHP Version: 5.3.5
Block user comment: N
Private report: N
New Comment:
I have the same issue, but using Parallels on a OS X.
I'm running a virtualized Debian 7, PHP 5.4.4-14+deb7u5 as my dev server.
The volume is mounted as a Parallels shared folder, in /media/psf/...
I have tested this script:
-----------------
<?php
$iterador = new RecursiveDirectoryIterator( __DIR__ . '/t1/');
foreach ($iterador as $file)
{
var_dump($file);
}
-----------------
If the script is inside the shared folder, the result is a blank page.
If I execute the script in a not shared folder, a native linux path, it shows an iterator for each
dir content.
Previous Comments:
------------------------------------------------------------------------
[2013-02-18 00:34:45] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
------------------------------------------------------------------------
[2012-10-26 19:34:33] maurice dot k at zend dot com
The same problem occurs with Parallels Workstation under Windows 7, when using
shared folders. DirectoryIterator is not iteratable using foreach.
Windows 7
Parallels Workstation v6
Linux Ubuntu 12.04.1-LTS
Any suggested workaround?
------------------------------------------------------------------------
[2011-09-23 07:01:25] sniper dot unreal at web dot de
Hi Everyone,
I had the same problem on ubuntu (which is also debian based).
After installing the VirtualBox guest additions that are on the ISO that comes with VirtualBox
instead of the guest additions bundled with debian/ubuntu solved the issue.
So you just have do install the guest additions on your VM and it should work fine.
------------------------------------------------------------------------
[2011-03-17 10:26:03] gege2061 at homecomputing dot fr
The problem is reproducible with php5.3-201103170730
------------------------------------------------------------------------
[2011-03-16 21:13:31] johannes@php.net
Please try using this snapshot:
http://snaps.php.net/php5.3-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
Works perfectly for me. "PHP version: 5.3.5-1" is none of our version numbers. MAybe your
distribution has patched this somehow. Please test our version or talk to the distributor.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=54256
--
Edit this bug report at https://bugs.php.net/bug.php?id=54256&edit=1