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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: gzimmermann at t-systems dot com
New email:
PHP Version: OS:

 

 [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: Wed Oct 09 09:01:26 2024 UTC