Bug #78159 [Com]: UNC | is_readable false | file_exists true | file_get_contents can read
| From: | d at pilichiewicz dot pl | Date: | Fri, 14 Jun 2019 18:05:09 +0000 |
| Subject: | Bug #78159 [Com]: UNC | is_readable false | file_exists true | file_get_contents can read | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-221317@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78159&edit=1
ID: 78159
Comment by: d at pilichiewicz dot pl
Reported by: d at pilichiewicz dot pl
Summary: UNC | is_readable false | file_exists true |
file_get_contents can read
Status: Duplicate
Type: Bug
Package: *Directory/Filesystem functions
Operating System: Windows 10 1903 x64
PHP Version: 7.3.6
Block user comment: N
Private report: N
New Comment:
Hey, thanks for youre answer.
How to fix this Bug?
Ive read youre linked bug report but can't find an solution...
Is there an solution?
greets,
Dominik
Previous Comments:
------------------------------------------------------------------------
[2019-06-14 08:37:54] sjon@php.net
thanks for your process-monitor output - this bug is a duplicate of bug #73543
------------------------------------------------------------------------
[2019-06-13 20:03:28] d at pilichiewicz dot pl
Description:
------------
Hello,
iam working on an diskstation by synergy connected with an windows domain ...
while creating an symfony project ive got a failure message shown me that .env coulnd read.
ive tested some scripts and yeah ... php has an problem there ...
$filename = this file is on an network share assign to Z:
var_dump(is_readable($filename)); = is false ... dunny why
var_dump(is_writeable($filename)); = is false, too
var_dump(is_dir($filename)); = is false, too
var_dump(file_exists($filename)); = is true
var_dump(file_get_contents($filename)); = read file content and display it
In Process Monitor ive recorded what happend while running the test script (with sleep 10 seconds to
see that happend where)
https://gist.github.com/privatehosting/3dd6876ffe4fc46100089d64d39171b2
Please excuse my English
Test script:
---------------
<?php
$filename = "Z:\Programmierung\php_pilichiewicz_cms/.env";
var_dump($filename);
sleep(10);
var_dump(is_readable($filename));
sleep(10);
var_dump(is_writeable($filename));
sleep(10);
var_dump(is_dir($filename));
sleep(10);
var_dump(file_exists($filename));
sleep(10);
var_dump(file_get_contents($filename));
?>
Expected result:
----------------
is_readable & is_writeable & is_dir should be true if file exists
Actual result:
--------------
is_readable & is_writeable & is_dir are false
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78159&edit=1