Bug #60636 [Opn]: Dots in folders results in a open_basedir restriction warning
| From: | laruence@php.net | Date: | Tue, 03 Jan 2012 17:06:25 +0000 |
| Subject: | Bug #60636 [Opn]: Dots in folders results in a open_basedir restriction warning | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-166181@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60636&edit=1
ID: 60636
Updated by: laruence@php.net
Reported by: fernando at consultorpc dot com
Summary: Dots in folders results in a open_basedir
restriction warning
Status: Open
Type: Bug
Package: Safe Mode/open_basedir
Operating System: Linux
PHP Version: 5.3.8
Block user comment: N
Private report: N
New Comment:
does that /home/example exists? I think this might has nothing to do with the
*dot*, but a mis-understand warning.
Previous Comments:
------------------------------------------------------------------------
[2012-01-02 13:56:27] fernando at consultorpc dot com
Description:
------------
If you try to access a file within a folder that has a dot, an open_basedir
restriction warning will show up even if the folder is in the allowed paths list.
Test script:
---------------
<?php
// Set open_basedir allowed paths to /home/example:/usr/lib/php:/tmp
file_exists('/home/example/public_html/myfolder.example/file.php'); // This results in a
open_basedir restriction warning
Expected result:
----------------
No warning should show up and i should be able to access the file normally.
Actual result:
--------------
The test script results in:
PHP Warning: file_exists() [<a href='function.file-exists'>function.file-
exists</a>]: open_basedir restriction in effect.
File(/home/example/public_html/myfolder.example/file.php) is not within the
allowed path(s): (/home/example:/usr/lib/php:/tmp) in
/home/example/public_html/test.php on line 3
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60636&edit=1