#41847 [Opn->Fbk]: open_basedir warning if a symlink does not exist
| From: | tony2001@php.net | Date: | Fri, 29 Jun 2007 12:05:23 +0000 |
| Subject: | #41847 [Opn->Fbk]: open_basedir warning if a symlink does not exist | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-114447@lists.php.net to get a copy of this message | ||
ID: 41847
Updated by: tony2001@php.net
Reported By: phpbugs at thequod dot de
-Status: Open
+Status: Feedback
Bug Type: Safe Mode/open_basedir
Operating System: Ubuntu Linux
PHP Version: 5CVS-2007-06-29 (CVS)
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows (zip):
http://snaps.php.net/win32/php5.2-win32-latest.zip
For Windows (installer):
http://snaps.php.net/win32/php5.2-win32-installer-latest.msi
Previous Comments:
------------------------------------------------------------------------
[2007-06-29 00:09:08] phpbugs at thequod dot de
Description:
------------
You'll get a open_basedir related warning, if you try to access a
symlink in open_basedir, but which points to a non-existent file:
PHP Warning: file_exists(): open_basedir restriction in effect.
File(symlink-exists-not) is not within the allowed path(s):
(/tmp/open_basedir-symlinks)
Reproduce code:
---------------
$ ls -l
.
..
open_basedir-warning-if-symlink-does-not-exist.php
symlink-exists -> .
symlink-exists-not -> foo
$ php -d open_basedir=
pwd
open_basedir-warning-if-symlink-does-not-exist.php
open_basedir-warning-if-symlink-does-not-exist.php:
---------------------------------------------------
<?php
var_dump( file_exists('symlink-exists') );
var_dump( file_exists('symlink-exists-not') );
var_dump( file_exists($_SERVER['argv'][0]) );
var_dump( file_exists('does-not-exist') );
?>
---------------------------------------------------
Expected result:
----------------
bool(true)
bool(false)
bool(true)
bool(false)
Actual result:
--------------
bool(true)
PHP Warning: file_exists(): open_basedir restriction in effect.
File(symlink-exists-not) is not within the allowed path(s):
(/tmp/open_basedir-symlinks)
in
/tmp/open_basedir-symlinks/open_basedir-warning-if-symlink-does-not-exist.php
on line 3
bool(false)
bool(true)
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41847&edit=1