From:             aldo at pepperstream dot nl
Operating system: SuSe
PHP version:      4.3.6
PHP Bug Type:     Scripting Engine problem
Bug description:  Require_once fails on diff. files in different dirs with same name & 
path

Description:
------------
I hope this bug has not already been reported but I have the following
directory structure:

root
 \_ src
 |_ plugins
     \_ [nameplugin]
           \_ src

(so a src directory in both root and in a plugin two directories further
up)

In a file in the root I refer to:
require_once('src/library.php'); 

and I do the same in the root/plugins/[nameplugin] directory:
require_once('src/library.php'); 

Now the second library.php refuses to be included. It referes to two
different files, but the include looks similar due to the relative path's
being used. 

When I renamed the second library.php to library2.php a test all my
functions and also some test code started working. 

Reproduce code:
---------------
root/index.php
require_once('src/library.php'); 

root/plugins/[nameplugin]/[nameplugin].php

require_once('src/library.php'); 



Expected result:
----------------
I expected both library.php's who exist on different path's to work and
not just the one to be included, as both files are actually different,
only their names and the relative path to differ.

Actual result:
--------------
second library.php was not included.

-- 
Edit bug report at http://bugs.php.net/?id=28775&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28775&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28775&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=28775&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=28775&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=28775&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=28775&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=28775&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=28775&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=28775&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=28775&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=28775&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=28775&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28775&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=28775&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=28775&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=28775&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28775&r=float

Reply via email to