Mombu the Php Forum sponsored links

Go Back   Mombu the Php Forum > Php > #37476 : is_readable(), file_exists() have problem with open_basedir
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 11th August 04:27
php-bugs
External User
 
Posts: 1
Default #37476 : is_readable(), file_exists() have problem with open_basedir



ID: 37476
Comment by: liquidpele at hotmail dot com
Reported By: info at wiredtek dot info
Status: No Feedback
Bug Type: *Directory/Filesystem functions
Operating System: Linux
PHP Version: 5.1.4
New Comment:

I also had an issue with this when going down a directory and then
coming up a directory to a file that DID exist.

Error shown was this:

Warning: file_exists() [function.file-exists]: open_basedir restriction
in effect. File(../form/application_submit.php) is not within the
allowed path(s): (/var/www/vhosts/***.com/subdomains/dev/httpdocs:/tmp)
in
/var/www/vhosts/***.com/subdomains/dev/httpdocs/partners/form/form.php
on line 24

The file application_submit.php did exist, but because the directory
was going down and then back up into the same directory, file_exits
incorrectly labeled it as not in the open_basedir list.


Previous Comments:
------------------------------------------------------------------------

[2006-05-27 01:00:01] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------

[2006-05-19 12:29:22] tony2001@php.net

I don't thin you need an ebuild to build an app from sources.
Please try the snapshot.

------------------------------------------------------------------------

[2006-05-19 12:26:12] info at wiredtek dot info

i'm not able to test the 5.2cvs version because i'm using
gentoo linux distro, so unless a working ebuild i'm not
able to test it. However i'll try a manual installation

------------------------------------------------------------------------

[2006-05-17 13:59:09] mike@php.net

Please try using this CVS snapshot:

http://snaps.php.net/php5.2-latest.tar.gz

For Windows:

http://snaps.php.net/win32/php5.2-win32-latest.zip

Seems to work fine.

------------------------------------------------------------------------

[2006-05-17 13:11:19] info at wiredtek dot info

Description:
------------
the function is_readable() and file_exists() report open_basedir
restriction also on files that are inside the open_basedir, showing a
warning on the screen, such as:

Warning: file_exists() [function.file-exists]: open_basedir restriction
in effect.
File(/var/www/ineluttabile.it/equilibrium/http-docs/skin/equilibrium/css/mozilla/style.css)
is not within the allowed path(s):
(/usr/share/php/:/var/www/ineluttabile.it/equilibrium/:/tmp/) in
/var/www/ineluttabile.it/equilibrium/http-docs/cryolibs/core/core.common.php
on line 582

the previous warning tell that file
/var/www/ineluttabile.it/equilibrium/http-docs/skin/equilibrium/css/mozilla/style.css
is not into the open_basedir, but the dir:
/var/www/ineluttabile.it/equilibrium/ is specified into the open_basedir
statement, so the warning must not be showed.

Investigating more deeply i have noticed that the warning do not happen
for 'all' the files involved with the function file_exists() or
is_readable(), but only for that files that do not exists. Infact,
checking
/var/www/ineluttabile.it/equilibrium/http-docs/skin/equilibrium/css/mozilla/style.css
the file do not exists, and file_exists() return correctly a FALSE
value, but the warning do not have any meaning (IMHO), maybe have a mean
for the function is_readable(), but not for file_exists() and however,
the file is inside the open_basedir restriction so it is a non sense
warning.

------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=37476&edit=1
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666