Bug #64986 [Fbk]: is_readable cannot read UNC path

From: Date: Fri, 07 Jun 2013 08:39:49 +0000
Subject: Bug #64986 [Fbk]: is_readable cannot read UNC path
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-179390@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=64986&edit=1

 ID:                 64986
 Updated by:         pajoye@php.net
 Reported by:        mhhechanova at gmail dot com
 Summary:            is_readable cannot read UNC path
 Status:             Feedback
 Type:               Bug
 Package:            *Directory/Filesystem functions
 Operating System:   Windows 64 Bit
 PHP Version:        5.3.26
 Block user comment: N
 Private report:     N

 New Comment:

This is a permission option, you can check it either using the command line tool 
or via the property dialog > security.


Previous Comments:
------------------------------------------------------------------------
[2013-06-07 08:38:59] pajoye@php.net

That was not my question :)

to see if something is readable, every part of the path is checked and for that we 
need the ability to read the property of each part. If one path does not have it, 
the operation will fail.

------------------------------------------------------------------------
[2013-06-07 08:00:54] mhhechanova at gmail dot com

Yes...in fact when using file_exists it returns TRUE

------------------------------------------------------------------------
[2013-06-07 07:57:51] pajoye@php.net

Are all parts of the path readable or with the access properties option set?

------------------------------------------------------------------------
[2013-06-07 07:36:55] mhhechanova at gmail dot com

Description:
------------
When using UNC path or share drive as a parameter for is_readable, the function 
returns FALSE even if the file exists

Test script:
---------------
<?php
  $isReadable = is_readable("\\\\servername\\sharename\\file.txt"); //returns false
  $fileExists = file_exists("\\\\servername\\sharename\\file.txt"); //returns true
?>

Expected result:
----------------
is_readable should return TRUE since the file exists.

Actual result:
--------------
is_readable returns FALSE


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



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


Thread (23 messages)

« previous php.bugs (#179390) next »