Bug #50709 [Fbk->NoF]: file_exists() triggers a warning when path contains file as dir and open_basedir
| From: | php-bugs at lists dot php dot net | Date: | Mon, 18 Feb 2013 00:34:05 +0000 |
| Subject: | Bug #50709 [Fbk->NoF]: file_exists() triggers a warning when path contains file as dir and open_basedir | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-176789@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=50709&edit=1
ID: 50709
Updated by: php-bugs@lists.php.net
Reported by: framelio at gmail dot com
Summary: file_exists() triggers a warning when path contains
file as dir and open_basedir
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: Safe Mode/open_basedir
Operating System: Linux
PHP Version: 5.3.1
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2010-04-24 04:16:14] felipe@php.net
Please try using this snapshot:
http://snaps.php.net/php5.3-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
------------------------------------------------------------------------
[2010-01-09 18:03:57] framelio at gmail dot com
Description:
------------
I have PHP 5.3.1 installed ad apache module with apache version Apache/2.2.14.
I configured a virtual host with the directive:
php_admin_value open_basedir "/usr/share/pear:/home:/var/www/hosts:/tmp"
The script is into the path: /home/user/web/test.php
and there is a symbolik link from "/var/www/hosts/domain.tld" to
"/home/user/web"
When I try to execute a file_exists on a path like this:
/var/www/hosts/domain.tld/test.php/testfile.file
Where "test.php" is a FILE and not a DIRECTORY
On all the other cases, no errors.
The special condition is the symbolink link and the filename in the path (like it's a
directory).
Reproduce code:
---------------
var_dump(file_exists("/var/www/hosts/domain.tld/test.php/testfile.file"));
// Where "test.php" is a FILE and not a DIRECTORY, and domain.tld is a symbolink link to
another directory.
Expected result:
----------------
bool(false)
Actual result:
--------------
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect.
File(/var/www/hosts/domain.tld/test.php/testfile.file) is not within the allowed path(s):
(/usr/share/pear:/home:/var/www/hosts:/tmp) in /home/user/web/test.php on line 1
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=50709&edit=1