php.net |  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
 [2003-12-09 21:07 UTC] kris at mha dot ca
Description:
------------
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.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-12-10 09:12 UTC] sniper@php.net
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: Sat Oct 05 19:01:27 2024 UTC