php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15175 is_dir does not work correctly
Submitted: 2002-01-22 16:53 UTC Modified: 2002-02-19 15:31 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: ddunn at lwdd dot fsnet dot co dot uk Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.1.0 OS: Windows 2000
Private report: No CVE-ID: None
 [2002-01-22 16:53 UTC] ddunn at lwdd dot fsnet dot co dot uk
The following code does not work on Windows 2000 Service Pack 2 with PHP 4.1.0 (no modules loaded, using php.exe). Webserver is IIS. 

is_dir reports back that directory does not exist when it does. Tried using clearstatcache and chdir etc..etc....no different...

Have tried on a Linux/Apache system and it works fine. 

if (is_dir("$complete_path") == true)
	{print ("Directory exists");}
else    {print ("Directory does not exist");


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-23 14:00 UTC] sander@php.net
Can you show us a 'complete path'? You're probably doing something wrong.
 [2002-01-24 14:58 UTC] ddunn at lwdd dot fsnet dot co dot uk
I have tried the following paths..

c:\\Inetpub\\wwwroot\\catalog\\images
c:\Inetpub\wwwroot\catalog\images
c:/Inetpub/wwwroot/catalog/images
\Inetpub\wwwroot\catalog\images
/Inetpub/wwwroot/catalog/images

Also tried with \ at the end of the pathname but this hangs the script.
 [2002-02-19 15:31 UTC] cmk@php.net
Can't reproduce with 4.1.1 on Windows 2000.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 16 23:01:30 2024 UTC