|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19725 is_readable return false but file is readable
Submitted: 2002-10-02 16:40 UTC Modified: 2002-10-03 17:06 UTC
From: regisr at regix dot com Assigned:
Status: Closed Package: Directory function related
PHP Version: 4.2.3 OS: FreeBSD 4.7-RC1
Private report: No CVE-ID: None
 [2002-10-02 16:40 UTC] regisr at regix dot com
The is_readable() does not return true but the file is readable (and reading is done...)
It is not a link (there is a reported bug about it on FreeBSD) but a plain file (rw-r--r--) and the directory is readable and searchable (rwxrwxrwx)

My code:
if (is_readable("book.lst")) {
    $conf_fic = file ("book.lst");
    $nb_photos =  count($conf_fic);
else {
    $conf_fic = file ("book.lst");
    $nb_photos =  count($conf_fic);

Every time I have the error message but the file is read.

I tried also 'if (is_readable("book.lst") == TRUE)' ...
(If it is a known FreeBSD bug I can't locate it: please give the bug report number).
The test was Ok in previous versions.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-02 17:07 UTC]
Please try using this CVS snapshot:
For Windows:
 [2002-10-03 17:06 UTC] regisr at regix dot com
solved with php4-200210021500 snapshot.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Aug 02 20:01:24 2021 UTC