Home > Archive > PHP Language > March 2008 > open_basedir and is_readable
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
open_basedir and is_readable
|
|
| Arancaytar 2008-02-06, 8:00 am |
| open_basedir exhibits very annoying (and imho buggy) behavior in
generating warnings even when is_readable() is called, rather than
just returning false as appropriate. This means it is impossible to
use is_readable as a precondition before opening a file.
Is there any way to check the preconditions of reading a file without
generating warnings for files outside open_basedir?
| |
| Arancaytar 2008-02-06, 8:00 am |
| On Feb 6, 2:26=A0pm, Arancaytar <arancaytar.ilya...@gmail.com> wrote:
> open_basedir exhibits very annoying (and imho buggy) behavior in
> generating warnings even when is_readable() is called, rather than
> just returning false as appropriate. This means it is impossible to
> use is_readable as a precondition before opening a file.
>
> Is there any way to check the preconditions of reading a file without
> generating warnings for files outside open_basedir?
Addendum: http://bugs.php.net/bug.php?id=3D37476 describes this behavior.
| |
| Wiktor Walc 2008-03-19, 8:01 am |
| Arancaytar pisze:
> On Feb 6, 2:26 pm, Arancaytar <arancaytar.ilya...@gmail.com> wrote:
>
> Addendum: http://bugs.php.net/bug.php?id=37476 describes this behavior.
I'm posting this just in case anyone looked for a quick solution: use
@is_readable.
--
CKFinder :: ajax web file browser
http://www.ckfinder.com
|
|
|
|
|