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

That build fixed it for me.


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

[2009-09-05 18:10:32] s...@php.net

Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&revision=288085
Log: - add test for #48746

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

[2009-09-05 16:34:37] paj...@php.net

Please try using:

http://windows.php.net/downloads/qa/test/php-5.3.2-dev-Win32-VC9-x86.zip

It is a striped down build (thread safe). Only CLI is available but no
worry, it behaves the same than apache in TS mode.

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

[2009-09-04 20:59:28] phpstuff at cresstone dot com

Using junctions: is_file and file_exists are giving incorrect behavior
(false on files). is_dir as well, false on directories in the junction
and the junction itself.

The same functions are working well with symlinks.

If you need testing for this, you have mail.

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

[2009-09-04 20:45:25] paj...@php.net

@[4 Sep 8:20pm UTC] phpstuff at cresstone dot com

Using is_dir and is_file or file_exists and the cases you described,
does it work? (I don't think the filetype issue is related to what we
discuss here).

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

[2009-09-04 20:20:02] phpstuff at cresstone dot com

I was able replicate shoresofnowhere's behavior using windows 7...


I created a junction to a folder on another drive; running is_file() on
a file inside that junction returned false, as did is_dir(). Curious to
see what php thought it was looking at, I tested filetype(), which threw
an error.

I then tested symlinks in the same manner, and got good behavior.
Symlinks seem to be a good workaround for this issue.

Test log follows:


C:\mnt\test>mklink /J junction_otherDrive f:\downloads
Junction created for junction_otherDrive <<===>> f:\downloads

C:\mnt\test>mklink /D symlink_otherDrive f:\downloads
symbolic link created for symlink_otherDrive <<===>> f:\downloads

C:\mnt\test>dir
 Volume in drive C is coreI7_System
 Volume Serial Number is 38E2-2B62

 Directory of C:\mnt\test

2009.09.04  16.05    <DIR>          .
2009.09.04  16.05    <DIR>          ..
2009.09.04  16.05    <JUNCTION>     junction_otherDrive [f:\downloads]
2009.09.04  16.05    <SYMLINKD>     symlink_otherDrive [f:\downloads]
               0 File(s)              0 bytes
               4 Dir(s)  30,034,223,104 bytes free

C:\mnt\test>php -r var_dump(filetype('junction_otherdrive'));
PHP Warning:  filetype(): Lstat failed for junction_otherdrive in
Command line code on line 1

Warning: filetype(): Lstat failed for junction_otherdrive in Command
line code on line 1
bool(false)

C:\mnt\test>php -r
var_dump(filetype('junction_otherdrive\php-5.2.0-win32-installer.msi'));
PHP Warning:  filetype(): Lstat failed for
junction_otherdrive\php-5.2.0-win32-installer.msi in Comm
and line code on line 1

Warning: filetype(): Lstat failed for
junction_otherdrive\php-5.2.0-win32-installer.msi in Command l
ine code on line 1
bool(false)

C:\mnt\test>php -r var_dump(filetype('symlink_otherdrive'));
string(3) "dir"

C:\mnt\test>php -r
var_dump(filetype('symlink_otherdrive\php-5.2.0-win32-installer.msi'));
string(4) "file"

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

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