php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78159 UNC | is_readable false | file_exists true | file_get_contents can read
Submitted: 2019-06-13 20:03 UTC Modified: 2019-06-14 18:31 UTC
From: d at pilichiewicz dot pl Assigned:
Status: Duplicate Package: *Directory/Filesystem functions
PHP Version: 7.3.6 OS: Windows 10 1903 x64
Private report: No CVE-ID: None
 [2019-06-13 20:03 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-06-14 08:37 UTC] sjon@php.net
-Status: Open +Status: Duplicate
 [2019-06-14 08:37 UTC] sjon@php.net
thanks for your process-monitor output - this bug is a duplicate of bug #73543
 [2019-06-14 18:05 UTC] d at pilichiewicz dot pl
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
 [2019-06-14 18:31 UTC] d at pilichiewicz dot pl
Ive disabled windows offline sync and retested it but it dont change anything ... 

just in process monitor you can see that php dont access C:\Windows\CBC anymore

Updated Gist:
https://gist.github.com/privatehosting/3dd6876ffe4fc46100089d64d39171b2

Best Regards,
Dominik
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 03 20:01:28 2024 UTC