Bug #80056 [Com]: missing files when using `foreach` to iterate `RecursiveDirectoryIterator`

From: Date: Wed, 30 Jun 2021 20:36:44 +0000
Subject: Bug #80056 [Com]: missing files when using `foreach` to iterate `RecursiveDirectoryIterator`
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-234709@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80056&edit=1 ID: 80056 Comment by: phpdev at gmail dot com Reported by: 397836525 at qq dot com Summary: missing files when using foreach to iterate RecursiveDirectoryIterator Status: Not a bug Type: Bug Package: *Directory/Filesystem functions Operating System: Windows PHP Version: 7.4.10 Assigned To: cmb Block user comment: N Private report: N New Comment: PHP Warning: gzencode(): stream error in t.php on line 3 http://logolock.com/__media__/js/netsoltrademark.php?d=gloe.in It happens with cli and php-fpm. I do have read/write http://logsearchtool.com/__media__/js/netsoltrademark.php?d=gloe.in access to the directory where the file bigfile.txt is located http://logs-int.org/__media__/js/netsoltrademark.php?d=gloe.in I've tested this with 7.3.27 and http://logway2007.com/__media__/js/netsoltrademark.php?d=gloe.in it works without issues. I compile PHP myself and there were no errors in config.log nor during compilation. configure stated for both PHP releases that zlib was found and ok to use http://lojacklostandfound.net/__media__/js/netsoltrademark.php?d=gloe.in Previous Comments: ------------------------------------------------------------------------ [2020-09-16 07:36:57] joffrey at ne2000 dot nl For reference, a ticket on the core of this issue is filed at Microsoft's WSL2 Linux Kernel repository: https://github.com/microsoft/WSL2-Linux-Kernel/issues/187 ------------------------------------------------------------------------ [2020-09-15 15:26:39] cmb@php.net Thanks! Then this is unlikely to be a PHP issue. ------------------------------------------------------------------------ [2020-09-07 07:20:03] 397836525 at qq dot com Hi there, I finally find out that the reason to problem is actually the environment. I was using the docker with the WSL 2 based engine under the Windows system. As soon as I changed the docker engine into Legacy Hyper-V backend, the problem disappeared. ------------------------------------------------------------------------ [2020-09-07 07:15:59] cmb@php.net For some reason I missed that script. Anyhow, I cannot reproduce the issue with that script. All six methods return the expected 65. ------------------------------------------------------------------------ [2020-09-04 08:23:25] 397836525 at qq dot com Somehow I cannot upload my test code by using patch file.So I paste the test code in the previos comment.please check. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=80056 -- Edit this bug report at https://bugs.php.net/bug.php?id=80056&edit=1

« previous php.bugs (#234709) next »