Edit report at https://bugs.php.net/bug.php?id=63241&edit=1
ID: 63241 Updated by: paj...@php.net Reported by: daniel dot stelter-gliese at innogames dot de Summary: PHP fails to open Windows deduplicated files -Status: Open +Status: Assigned Type: Bug Package: Win32API related Operating System: Windows Server 2012 PHP Version: 5.4.7 -Assigned To: +Assigned To: mattficken Block user comment: N Private report: N New Comment: Matt, can you try to reproduce it please? Previous Comments: ------------------------------------------------------------------------ [2012-10-08 16:17:44] daniel dot stelter-gliese at innogames dot de Description: ------------ Opening a file that was deduplicated by Windows Server 2012 deduplication fails with "No such file or directory". The behavior can be reproduced locally and through SMB shares (on Win7 and Win8 clients). I've tried 5.3.15 and 5.4.7 - judging from the code latest snapshots are affected, too. I could trace this to a problem with reparse points: deduplication adds the new reparse tag IO_REPARSE_TAG_DEDUP. There seems to be no documentation on this tag, so I could only interpret it as a flag to be ignored. The attached patch simply treats a IO_REPARSE_TAG_DEDUP file as a substitute on the same path, which worked well. Test script: --------------- $path = 'S:\\test.exe'; var_dump(filesize($path)); var_dump(realpath($path)); var_dump(strlen(file_get_contents($path))); var_dump(fopen($path, 'rb')); Expected result: ---------------- int(5448704) string(50) "S:\test.exe" int(5448704) resource(6) of type (stream) Actual result: -------------- int(5448704) bool(false) Warning: file_get_contents(S:\test.exe): failed to open stream: No such file or directory in C:\php-sdk\php54dev\vc9\x64\ php-5.4.7-src\x64\Release\test.php on line 6 int(0) Warning: fopen(S:\test.exe): failed to op en stream: No such file or directory in C:\php-sdk\php54dev\vc9\x64\php-5.4.7-sr c\x64\Release\test.php on line 7 bool(false) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=63241&edit=1