php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36088 is_dir fails, if trying to access a directory on another drive
Submitted: 2006-01-19 16:29 UTC Modified: 2006-01-19 16:32 UTC
From: gzimmermann at t-systems dot com Assigned:
Status: Not a bug Package: Directory function related
PHP Version: 5.1.2 OS: Windows 2003 Server
Private report: No CVE-ID: None
 [2006-01-19 16:29 UTC] gzimmermann at t-systems dot com
Description:
------------
A Script running in apache 2.0.55 (installed on drive c:) is trying to check for the existence of a directory; this is located on a raid-system, therefore outside of the webroot.

Checking for the existence of the directory with the code below using is_dir always fails, while using opendir in the manner shown works correctly. 

The same 'is_dir'-script run from the commandline works, so a connection to apache seems to exist, but neither php nor apache have any restrictions in accessing the filesytem(s).



Reproduce code:
---------------
erroneous:
<?php
if (is_dir('d:/directory'))
{
    echo 'a';
}
else
    echo 'b';
  ?>

working:
<?php
if (opendir('d:/directory'))
{
    echo 'a';
    closedir($dh);
}
else
    echo 'b';
  ?>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-01-19 16:32 UTC] tony2001@php.net
Duplicate of bug #35691.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 09 03:01:27 2024 UTC