|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-09-13 17:09 UTC] ab@php.net
-Status: Open
+Status: Feedback
[2018-09-13 17:09 UTC] ab@php.net
[2018-09-14 11:32 UTC] dominique at ottello dot net
-Status: Feedback
+Status: Open
-PHP Version: 7.3.0RC1
+PHP Version: 7.3.0RC1 32bit
[2018-09-14 11:32 UTC] dominique at ottello dot net
[2018-09-14 11:42 UTC] cmb@php.net
-Status: Open
+Status: Not a bug
-Assigned To:
+Assigned To: cmb
[2018-09-14 11:42 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 05:00:01 2025 UTC |
Description: ------------ PHP 7.3.0rc1 32 bit on Windows 7 64 bit Return false for file_exists('c:/windows/system32/drivers/etc/hosts'); or is_writable('c:/windows/system32/drivers/etc/hosts'); although we can open this file or take its content by file() or file_get_contents() and even modify it with fwrite(). I have never encountered this problem with any other version of PHP, including 7.2.10 32 bit. I went back to the first version PHP 7.3.0alpha2 which has the same problem. Test script: --------------- $c_hostsFile = str_replace("\\","/",getenv('WINDIR').'/system32/drivers/etc/hosts'); // Check file_exists $i = 1; $def = 0; do { clearstatcache(); if(!file_exists($c_hostsFile)) { echo "File ".$c_hostsFile." DOES NOT EXISTS - Test number ".$i."<br>"; $def++; } $del = rand(100,500)*1000; //echo "Test number ".$i." Delay ".($del/1000)." ms<br>"; usleep($del); $i++; } while ($i < 100 && $def < 10); echo $i." tests<br>"; Expected result: ---------------- --- Windows NT 6.1 build 7601 (Windows 7 Professional Edition Service Pack 1) x64 64bit--- --- Serveur Apache/2.4.34 (Win32) PHP/7.3.0RC1 --- --- PHP version 7.3.0RC1 32bit ---- 100 tests Actual result: -------------- --- Windows NT 6.1 build 7601 (Windows 7 Professional Edition Service Pack 1) x64 64bit--- --- Serveur Apache/2.4.34 (Win32) PHP/7.3.0RC1 --- --- PHP version 7.3.0RC1 32bit ---- File C:/Windows/system32/drivers/etc/hosts DOES NOT EXISTS - Test number 1 File C:/Windows/system32/drivers/etc/hosts DOES NOT EXISTS - Test number 2 File C:/Windows/system32/drivers/etc/hosts DOES NOT EXISTS - Test number 3 File C:/Windows/system32/drivers/etc/hosts DOES NOT EXISTS - Test number 4 File C:/Windows/system32/drivers/etc/hosts DOES NOT EXISTS - Test number 5 File C:/Windows/system32/drivers/etc/hosts DOES NOT EXISTS - Test number 6 File C:/Windows/system32/drivers/etc/hosts DOES NOT EXISTS - Test number 7 File C:/Windows/system32/drivers/etc/hosts DOES NOT EXISTS - Test number 8 File C:/Windows/system32/drivers/etc/hosts DOES NOT EXISTS - Test number 9 File C:/Windows/system32/drivers/etc/hosts DOES NOT EXISTS - Test number 10 11 tests