|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-06-16 09:45 UTC] langemeijer@php.net
[2012-06-18 15:33 UTC] tjg at soe dot ucsc dot edu
[2012-06-20 14:59 UTC] langemeijer@php.net
-Status: Open
+Status: Not a bug
[2012-06-20 14:59 UTC] langemeijer@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 04:00:02 2025 UTC |
Description: ------------ Hi, I am connecting to a Solaris file server and running a readdir (see the test script for more information). The script iterates through everything in the folder, and then on the last iteration, where readdir() should return false, it just hangs. The process is killable via ctrl-C but it never completes that loop. The folder in question has a few hundred files, but other systems are able to list the files in that folder without a problem. I've tried two different PHP clients: FreeBSD (PHP 5.3.10) clients and CentOS (5.1.6) and both behave the same way. Other SFTP applications do not seem to have this problem. For example, if I connect using the FreeBSD SFTP command-line client, it works as expected. Test script: --------------- $folder = opendir("ssh2.sftp://" . $sftp . $folder_name); if (!$folder) { echo "ERROR: Could not list folder contents on " . $server_name . "!\n"; exit(1); } while (($file_name = readdir($folder)) !== false) { echo $file_name . "\n"; } Expected result: ---------------- It should print out a list of the files in the remote folder. Actual result: -------------- The script hangs on what should be the last readdir().