From: [EMAIL PROTECTED]
Operating system: Mac OS X 10.1.3
PHP version: 4.1.2
PHP Bug Type: Filesystem function related
Bug description: include_once includes multiple times
There is a bug with include_once including a file twice, if it is
referenced once with a fully qualified path and once with only the
filename (and the file being in the include path). This script illustrates
what I mean:
include_once('x.php');
include_once('/home/janneck/public_html/x.php');
On my Mac OS X 10.1.3, Apache 1.3.22, PHP 4.1.2 (also: 4.0.6) system, this
results in x.php getting included twice. (It works as expected on RedHat
7.1, Apache 1.3.22, PHP 4.0.6.)
doing "var_dump(get_included_files());" shows the following:
array(2) { [0]=> string(6) "/x.php" [1]=> string(40)
"/home/janneck/public_html/x.php" }
This might be related to a problem with the "realpath()" function which
does not work correctly but returns "" all the time.
--
Edit bug report at http://bugs.php.net/?id=16409&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=16409&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=16409&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=16409&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=16409&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16409&r=support
Expected behavior: http://bugs.php.net/fix.php?id=16409&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16409&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16409&r=submittedtwice