|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26570 is_dir fails for UNC filepaths.
Submitted: 2003-12-09 21:07 UTC Modified: 2003-12-10 13:42 UTC
From: kris at mha dot ca Assigned:
Status: Not a bug Package: Directory function related
PHP Version: 4.3.4 OS: Windows 2000 and NT 4 CGI
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.
Block user comment
Status: Assign to:
Bug Type:
From: kris at mha dot ca
New email:
PHP Version: OS:


 [2003-12-09 21:07 UTC] kris at mha dot ca
is_dir fails on UNC filepaths on windows.  It is not a permissions problem since every other command works, and
there is a workaround (using opendir).

Reproduce code:
$net_dir = '//goose/test_share/';
$net_file = $net_dir."test.txt";
if (is_dir($net_dir)) {
    echo "  is_dir successful.\n";
} else {
    echo "  is_dir failed.\n";
if ($dh = opendir($net_dir)) {
    echo "  opendir successfull.\n";
} else {
    echo "  opendir failed.\n";

Expected result:
  is_dir successfull.
  opendir successfull.

Actual result:
  is_dir failed.
  opendir successfull.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-12-10 09:12 UTC]
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

See bug #24795

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 04:01:38 2024 UTC