php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24308 opendir() doesn't handle Windows filesnames with spaces
Submitted: 2003-06-24 02:45 UTC Modified: 2003-06-27 18:22 UTC
From: john at cloudyhands dot com Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: PHP Version 4.3.2 OS: Windows XP
Private report: No CVE-ID: None
 [2003-06-24 02:45 UTC] john at cloudyhands dot com
Description:
------------
here is the error:

Warning: opendir(C:\Documents and Settings\john\My Documents\My Pictures\2003_0622) [function.opendir]: failed to open dir: Invalid argument in C:\jf\php\htmlScan\showPics.php on line 202
Cannot find C:\Documents and Settings\john\My Documents\My Pictures\2003_0622.

There is such a directory, and trying a different directory with no spaces does work.  

So, Windows gets you again!  :)


Reproduce code:
---------------
$dfltRoot = "C:\\Documents and Settings\\john\\My Documents\\My Pictures\\2003_0622";
opendir($dfltRoot);


Expected result:
----------------
opendir() returns the directory handle.

Actual result:
--------------
see error listed in description

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-26 12:06 UTC] sniper@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

PHP 4.3.2 is already released with lot of fixes.

 [2003-06-27 18:22 UTC] john at cloudyhands dot com
unless I'm missing something, this ain't fixed.  back at you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 23:01:28 2024 UTC