ID:               42832
 User updated by:  jmboyd at bluebottle dot com
 Reported By:      jmboyd at bluebottle dot com
-Status:           No Feedback
+Status:           Open
 Bug Type:         Directory function related
 Operating System: Windows 2000
 PHP Version:      5.2CVS-2007-10-03
 New Comment:

Hey, I did provide feedback!  Lousy robot.

Just tried it again with the latest 5.3.0alpha2-dev build stamped Mon,
25 Aug 2008 10:05:33 -0400, same result.  I can post the output if
needed, but it's exactly the same as the 18 Aug 5:54pm UTC comment
above.


Previous Comments:
------------------------------------------------------------------------

[2008-08-23 01:00:00] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------

[2008-08-18 17:54:24] jmboyd at bluebottle dot com

Same result with the snapshot (from Mon, 18 Aug 2008 14:03:00 -0400):

C:\parentdir\subdir>\php53dev\php -r "foreach(scandir('.') as $f)
{echo($f); }"

Warning: scandir(.): failed to open dir: Bad file descriptor in Command
line code on line 1

Warning: scandir(): (errno 9): Bad file descriptor in Command line code
on line 1

Warning: Invalid argument supplied for foreach() in Command line code
on line 1

------------------------------------------------------------------------

[2008-08-15 17:27:00] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.3-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.3-win32-installer-latest.msi



------------------------------------------------------------------------

[2007-10-04 01:59:28] jmboyd at bluebottle dot com

Same result with the snapshot (from 03 Oct 2007 20:09:47):

C:\parentdir\subdir>\php525dev\php -r "foreach(scandir('.') as $f) {
echo($f); }"

Warning: scandir(.): failed to open dir: Bad file descriptor in Command
line code on line 1

Warning: scandir(): (errno 9): Bad file descriptor in Command line code
on line 1

Warning: Invalid argument supplied for foreach() in Command line code
on line 1

------------------------------------------------------------------------

[2007-10-02 17:57:35] jmboyd at bluebottle dot com

Description:
------------
A user must have permissions for a directory's parent in order to scan
it with scandir.  If the user does not have permissions (for instance,
user has "Full Control" over the subdir but is not in the parent's ACL
at all), php fails with a "failed to open dir: Bad file descriptor"
error followed by a "(errno 9): Bad file descriptor" error.

Based on the quick test in the "Actual results" box below, this bug
seems to have arrived between 5.2.1 and 5.2.2.  No php.ini is in use in
any of the tests.

Reproduce code:
---------------
Any use of scandir will work, here's a quick one to do from the command
line, after cding to the subdir:

php -r "foreach(scandir('.') as $f) { echo($f); }"

Expected result:
----------------
The subdirectory's filenames (all run together):

...file1.txtfile2.txtfile3.txt

Actual result:
--------------
C:\>cd \parentdir
Access is denied.

C:\>cd \parentdir\subdir

C:\parentdir\subdir>dir /B
file1.txt
file2.txt
file3.txt

C:\parentdir\subdir>\php521\php -r "foreach(scandir('.') as $f) {
echo($f); }"
...file1.txtfile2.txtfile3.txt
C:\parentdir\subdir>\php522\php -r "foreach(scandir('.') as $f) {
echo($f); }"

Warning: scandir(.): failed to open dir: Bad file descriptor in Command
line code on line 1

Warning: scandir(): (errno 9): Bad file descriptor in Command line code
on line 1

Warning: Invalid argument supplied for foreach() in Command line code
on line 1

C:\parentdir\subdir>\php524\php -r "foreach(scandir('.') as $f) {
echo($f); }"

Warning: scandir(.): failed to open dir: Bad file descriptor in Command
line code on line 1

Warning: scandir(): (errno 9): Bad file descriptor in Command line code
on line 1

Warning: Invalid argument supplied for foreach() in Command line code
on line 1


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=42832&edit=1

Reply via email to