Tampering with a coWiki (www.cowiki.org) plugin, I noticed that
is_readable()
returns false, when PHP actually can read the file.
(Just commented out an "if (!is_readable($sRealPath))" and then
all went fine, the plugin now can read the files...)
Is there a known reason for or has anoyone bumped into this? (Just
asking so I can decide if I should put some efforts to investigating
this.)
Thanks,
Sz.
Hello Luna,
most probably the file rights prevent the web server from reading it.
The function works as expected in 4.3.6rc as well as php5.
Apart from that this is neither a bug list nor a support list.
marcus
Saturday, April 3, 2004, 1:56:11 AM, you wrote:
Tampering with a coWiki (www.cowiki.org) plugin, I noticed that
is_readable()
returns false, when PHP actually can read the file.
(Just commented out an "if (!is_readable($sRealPath))" and then
all went fine, the plugin now can read the files...)
Is there a known reason for or has anoyone bumped into this? (Just
asking so I can decide if I should put some efforts to investigating
this.)
Thanks,
Sz.
--
Best regards,
Marcus mailto:helly@php.net
Dear Marcus:
most probably the file rights prevent the web server from reading it.
As I mentioned: "PHP actually can read the file" -- and even though I
haven't explicitly said, most obviously I implied: from the web server.
The function works as expected in 4.3.6rc as well as php5.
As I mentioned: no, it does not work as expected, unfortunately, at least in PHP5.
Apart from that this is neither a bug list nor a support list.
I see. So you mean one cannot ask questions regarding potential PHP
implementation problems here? What then? Besides, let me tell you that I
myself had this concern, so two weeks ago I posted a question here titled
"PHP5: where to go with PHP5 betatesting feedback?" (because I simply
could not find a hint of the correct answer to that question in the available
PHP docs...). Nobody replied. Then, monitoring the postings here I found
probably this might still be a place for such things, considering that the
people, who are most interested in such issues -- the PHP developers
-- are concentrated here quite densely...
Regards,
Szabolcs
Saturday, April 3, 2004, 1:56:11 AM, you wrote:
Tampering with a coWiki (www.cowiki.org) plugin, I noticed that
is_readable()
returns false, when PHP actually can read the file.
(Just commented out an "if (!is_readable($sRealPath))" and then
all went fine, the plugin now can read the files...)Is there a known reason for or has anoyone bumped into this? (Just
asking so I can decide if I should put some efforts to investigating
this.)Thanks,
Sz.--
Best regards,
Marcus mailto:helly@php.net
stat() (of which is_readable()
is a variant) was refactored slightly with
PHP5.
Take a look at the output of stat($sRealPath) and the user/group that the
webserver is running as. It'll also help to know what OS/webserver/sapi is
being used.
-Sara
----- Original Message -----
From: "Luna Kid" lunakid@neuropolis.org
Newsgroups: php.internals
To: internals@lists.php.net
Sent: Friday, April 02, 2004 3:56 PM
Subject: is_readable stricter than it should be (PHP5 only?)
Tampering with a coWiki (www.cowiki.org) plugin, I noticed that
is_readable()
returns false, when PHP actually can read the file.
(Just commented out an "if (!is_readable($sRealPath))" and then
all went fine, the plugin now can read the files...)Is there a known reason for or has anoyone bumped into this? (Just
asking so I can decide if I should put some efforts to investigating
this.)Thanks,
Sz.
Tampering with a coWiki (www.cowiki.org) plugin, I noticed that
is_readable()
returns false, when PHP actually can read the file.
(Just commented out an "if (!is_readable($sRealPath))" and then
all went fine, the plugin now can read the files...)Is there a known reason for or has anoyone bumped into this? (Just
asking so I can decide if I should put some efforts to investigating
this.)
stat()
(of whichis_readable()
is a variant) was refactored slightly with
PHP5.Take a look at the output of stat($sRealPath) and the user/group that the
webserver is running as. It'll also help to know what OS/webserver/sapi is
being used.-Sara
OK, thanks for the hint, I'll try to find out more then to see if that's a problem
of PHP or something else.
Cheers,
Sz.
Cannot reproduce this any more.
(It occured on two different Debian unstable installations, with PHP5-beta3
on apache 1.3.29(?) and the other with PHP5-RC1 on apache-ssl 1.3.29.0.2-4),
with the same result: file could be read, still is_readable returned false).
Now, let's hope I just missed something outside of PHP's scope. That happens
to me quite easily... :-/
Good night,
Sz.
"Luna Kid" lunakid@neuropolis.org wrote in message news:20040403025308.77620.qmail@pb1.pair.com...
Tampering with a coWiki (www.cowiki.org) plugin, I noticed that
is_readable()
returns false, when PHP actually can read the file.
(Just commented out an "if (!is_readable($sRealPath))" and then
all went fine, the plugin now can read the files...)Is there a known reason for or has anoyone bumped into this? (Just
asking so I can decide if I should put some efforts to investigating
this.)
stat()
(of whichis_readable()
is a variant) was refactored slightly with
PHP5.Take a look at the output of stat($sRealPath) and the user/group that the
webserver is running as. It'll also help to know what OS/webserver/sapi is
being used.-Sara
OK, thanks for the hint, I'll try to find out more then to see if that's a problem
of PHP or something else.Cheers,
Sz.