php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #14424 is_readable returns error if file does not exist.
Submitted: 2001-12-11 08:22 UTC Modified: 2001-12-12 15:21 UTC
From: jm at tv3ooo dot nl Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.1.0 OS: Suse linux 7.2
Private report: No CVE-ID: None
 [2001-12-11 08:22 UTC] jm at tv3ooo dot nl
Code example:
if (is_readable("foo")) {
    echo "file exists.<P>";
} else {
    echo "file does not exist.<P>";
}

Error message:
Warning: stat failed for foo (errno=2 - No such file or directory) in /home/xxx/public_html/is_readable.php on line 3

Configure options:
./configure --with-apache=/home/xxx/apache_1.3.22 --with-mysql=/usr/local --with-gd=/usr/local --with-zlib-dir=/usr/local --with-png-dir=/usr --with-jpeg-dir=/home/xxx/jpeg-6b --with-xpm-dir=/usr/X11R6  --with-ttf  --with-curl

Seems similar to is_file() bug. Problem does not occur on older versions (i.e. 4.0.6).

Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-12 06:40 UTC] sander@php.net
So what's the problem? is_readable now returns an error, which is IMHO fine. The only problem is that it's not documented. Changing to docu prob.
 [2001-12-12 10:17 UTC] jm at tv3ooo dot nl
So that is what you call downwards compatible?
I build a site under 4.0.6, it works fine.
There is an update to PHP, my sites break.

 [2001-12-12 11:37 UTC] sniper@php.net
This is fixed in CVS long time ago. The change didn't make it to 4.1.0
though. 

--Jani

 [2001-12-12 15:21 UTC] goba@php.net
This is what we call an accidental problem. Things like
this can happen in such a big project as PHP.

Goba
 [2002-08-27 17:04 UTC] cvb at clausvb dot de
We encoutered this bug yesterday.

Suse linux 8.0 is using PHP 4.1.0 and so this bug applies here I think.

Since it was fixed in 4.1.2 (or 4.1.1) I think anyone who encounters this bug should upgrade.

Best regards,
ClausVB
 [2002-08-27 17:07 UTC] cvb at clausvb dot de
We encoutered this bug yesterday.

Suse linux 8.0 is using PHP 4.1.0 and so this bug applies here I think.

Since it was fixed in 4.1.2 (or 4.1.1) I think anyone who encounters this bug should upgrade.

Best regards,
ClausVB
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Aug 03 04:01:28 2024 UTC