Bug #60636 [NEW]: Dots in folders results in a open_basedir restriction warning

From: Date: Mon, 02 Jan 2012 13:56:28 +0000
Subject: Bug #60636 [NEW]: Dots in folders results in a open_basedir restriction warning
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-166168@lists.php.net to get a copy of this message
From:             
Operating system: Linux
PHP version:      5.3.8
Package:          Safe Mode/open_basedir
Bug Type:         Bug
Bug description:Dots in folders results in a open_basedir restriction warning

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 bug report at https://bugs.php.net/bug.php?id=60636&edit=1
-- 
Try a snapshot (PHP 5.4):            https://bugs.php.net/fix.php?id=60636&r=trysnapshot54
Try a snapshot (PHP 5.3):            https://bugs.php.net/fix.php?id=60636&r=trysnapshot53
Try a snapshot (trunk):              https://bugs.php.net/fix.php?id=60636&r=trysnapshottrunk
Fixed in SVN:                        https://bugs.php.net/fix.php?id=60636&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=60636&r=needdocs
Fixed in release:                    https://bugs.php.net/fix.php?id=60636&r=alreadyfixed
Need backtrace:                      https://bugs.php.net/fix.php?id=60636&r=needtrace
Need Reproduce Script:               https://bugs.php.net/fix.php?id=60636&r=needscript
Try newer version:                   https://bugs.php.net/fix.php?id=60636&r=oldversion
Not developer issue:                 https://bugs.php.net/fix.php?id=60636&r=support
Expected behavior:                   https://bugs.php.net/fix.php?id=60636&r=notwrong
Not enough info:                     https://bugs.php.net/fix.php?id=60636&r=notenoughinfo
Submitted twice:                     https://bugs.php.net/fix.php?id=60636&r=submittedtwice
register_globals:                    https://bugs.php.net/fix.php?id=60636&r=globals
PHP 4 support discontinued:          https://bugs.php.net/fix.php?id=60636&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=60636&r=dst
IIS Stability:                       https://bugs.php.net/fix.php?id=60636&r=isapi
Install GNU Sed:                     https://bugs.php.net/fix.php?id=60636&r=gnused
Floating point limitations:          https://bugs.php.net/fix.php?id=60636&r=float
No Zend Extensions:                  https://bugs.php.net/fix.php?id=60636&r=nozend
MySQL Configuration Error:           https://bugs.php.net/fix.php?id=60636&r=mysqlcfg



Thread (9 messages)

« previous php.bugs (#166168) next »