|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5808 the function opendir does not return the list, but a value like Resource id #1
Submitted: 2000-07-27 10:39 UTC Modified: 2000-07-27 11:24 UTC
From: maximus80 at hotmail dot com Assigned:
Status: Closed Package: Other
PHP Version: 4.0.1 OS: linux redhat 6.2
Private report: No CVE-ID: None
 [2000-07-27 10:39 UTC] maximus80 at hotmail dot com
----- PHP Source code -----
                     echo "Directory handle: $handle\n";
                     echo "Files:\n";
                     while ($file = readdir($handle)) {
                         echo "$file\n";

----- PHP configure command ------
'./configure' '--with-apache=/usr/local/src/apache_1.3.12/' '--with-ttf' '--with-gd=/usr/local/'
                                      '--with-pdflib=/usr/local' '--with-pgsql=/usr/local/pgsql/' '--with-zlib' '--with-jpeg-dir=/usr/'
                                      '--with-tiff-dir=/usr/' '--disable-debug'


the first time that I execute the code, all it's OK, but the second, the third etc... the function opendir doesn't return the list of the files of the directory.

I have checked the permission of the directories and the files, but the function doesn't return the expected value.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-27 11:24 UTC]
Yes, opendir returns handle. That's how it is meant to work.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Feb 04 07:07:04 2023 UTC