#37749 [NEW]: require does not function properly under certain conditions
| From: | eroberts at gowfb dot com | Date: | Thu, 08 Jun 2006 17:49:59 +0000 |
| Subject: | #37749 [NEW]: require does not function properly under certain conditions | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-98197@lists.php.net to get a copy of this message | ||
From: eroberts at gowfb dot com
Operating system: Linux
PHP version: 4.4.2
PHP Bug Type: Filesystem function related
Bug description: require does not function properly under certain conditions
Description:
------------
If you are in directory: rootdir/
and you require file: rootdir/dir/file1.php
and file1.php requires file2.php
if a file named file2.php does not exist in rootdir/, then file2 will be
rootdir/dir/file2.php,
BUT, if a file named file2.php exists in rootdir/, then file2 will be
rootdir/file2.php
Reproduce code:
---------------
#### base.php
require 'somedir/file1.php';
#### file1.php
require 'file2.php';
Expected result:
----------------
if ./file2.php exists, then file1.php will include ./file2.php
if ./file2.php does not exist and ./somedir/file2.php exists, then
file1.php will include ./somedir/file2.php
--
Edit bug report at http://bugs.php.net/?id=37749&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37749&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37749&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37749&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=37749&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=37749&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=37749&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=37749&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=37749&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=37749&r=support
Expected behavior: http://bugs.php.net/fix.php?id=37749&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=37749&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=37749&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=37749&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37749&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=37749&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=37749&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=37749&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=37749&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=37749&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=37749&r=mysqlcfg