php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: regisr at regix dot com
New email:
PHP Version: OS:

 

 [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 {
    print("error<br>");
    $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.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-02 17:07 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip
 [2002-10-03 17:06 UTC] regisr at regix dot com
solved with php4-200210021500 snapshot.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 15:01:38 2025 UTC