ID:               48746
 Comment by:       phpstuff at cresstone dot com
 Reported By:      ddkees at illinois dot edu
 Status:           Assigned
 Bug Type:         Directory function related
 Operating System: win32 only - Windows Server 2003
 PHP Version:      5.3.0
 Assigned To:      pajoye
 New Comment:

For what it's worth, I've reproduced the incorrect behavior on the
following OSes so far:
Windows 7 x64
Vista x64 SP2
Server 2003 x64 SP2
XP SP2

For other readers, these are the submitted issues I've found that may
be related to this bug:
http://bugs.php.net/bug.php?id=48778
http://bugs.php.net/bug.php?id=48746
http://bugs.php.net/bug.php?id=48975
http://bugs.php.net/bug.php?id=49039


Previous Comments:
------------------------------------------------------------------------

[2009-08-10 21:41:37] paj...@php.net

and confirmed using XP SP3 as well.

For the record, get the junction command here:
http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx

------------------------------------------------------------------------

[2009-08-10 20:23:35] paj...@php.net

Ok, seems to be 2k3 specific. The same setup works on 2k8/vista/win7.
Thanks for your feedback!

------------------------------------------------------------------------

[2009-08-10 20:17:32] phpstuff at cresstone dot com

cgi executable does not seem to make a difference. This is a console
log of a test I just ran:

C:\mnt\test>type phptest.php
<?php
var_dump(file_exists('junction'));
var_dump(file_exists('directory'));
?>
C:\mnt\test>dir
 Volume in drive C is coreI7_System
 Volume Serial Number is 38E2-2B62

 Directory of C:\mnt\test

2009.08.10  16.11    <DIR>          .
2009.08.10  16.11    <DIR>          ..
2009.08.10  16.10    <DIR>          directory
2009.08.10  16.10    <JUNCTION>     junction
[\??\Volume{e13ba66a-14db-11de-8e96-001fd0ae05ac}\]
2009.08.10  16.11                82 phptest.php
               1 File(s)             82 bytes
               4 Dir(s)  24,899,223,552 bytes free

C:\mnt\test>php.exe phptest.php
bool(false)
bool(true)

C:\mnt\test>php-cgi.exe phptest.php
X-Powered-By: PHP/5.3.0
Content-type: text/html

bool(false)
bool(true)

C:\mnt\test>

------------------------------------------------------------------------

[2009-08-10 15:40:17] paj...@php.net

@dr dot e dot sheppard at web dot de

Can you try using CLI/CGI please? As you can see below it works just
fine.

C:\Users\pierre\Documents\php-sdk\php53\vc9\x86>dir
..
10.08.2009  17:36    <JUNCTION>     apps
[C:\Users\pierre\Documents\php-sdk\php53\vc9\x86\deps]
28.07.2009  00:59    <DIR>          deps
...


php.exe -r "var_dump(file_exists('./apps'));"
bool(true)


------------------------------------------------------------------------

[2009-06-30 20:30:47] dr dot e dot sheppard at web dot de

This bug can easily be reproduced with the following scenario:

- change to a directory within your webserver's document root
- create a junction named "apps" pointing to the desired target within
the directory tree
- calling a php file (residing in parallel to the "apps" folder) with
the following code:

if(file_exists('./apps') === true){ 
   echo 'yes!';
} else {
   echo 'no!';
}

The result will be "no!".

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/48746

-- 
Edit this bug report at http://bugs.php.net/?id=48746&edit=1

Reply via email to