From: [EMAIL PROTECTED]
Operating system: Windows 2000 (IIS5.0)
PHP version: 4.2.0
PHP Bug Type: Filesystem function related
Bug description: PHP4.10 and PHP4.20 includes different files when calling
include_once()
I found the PHP4.10 and PHP4.20 use different ways to
handle relative path when calling include_once(). Here is
an example. Consider the following file structure:
c:/inetpub/wwwroot/test/a.php
c:/inetpub/wwwroot/test/inc/b.php
c:/inetpub/wwwroot/test/cls/c.php
c:/inetpub/wwwroot/test/inc/cls/c.php
test/a.php:
<?
echo "<BR>now in ".__FILE__;
include_once("inc/b.php");
?>
test/inc/b.php:
<?
echo "<BR>now in ".__FILE__;
include_once("cls/c.php");
?>
test/cls/c.php and test/inc/cls/c.php
<?
echo "<BR>now in ".__FILE__;
?>
PHP 4.10 shows this result:
now in c:/inetpub/wwwroot/test/a.php
now in c:/inetpub/wwwroot/test/inc/b.php
now in c:/inetpub/wwwroot/test/cls/c.php
But PHP4.20 shows this result:
now in c:/inetpub/wwwroot/test/a.php
now in c:/inetpub/wwwroot/test/inc/b.php
now in c:/inetpub/wwwroot/test/inc/cls/c.php
I did not found related announcement in the 4.20 and 4.21
release notes, so I think it is a bug (or at least an
incompatiable issue.)
Here are my php.ini settings (in both 4.10 and 4.20):
1. Enable register_globals
2. Disable magic_quote_gpc
3. Change execution time limit to 60sec
4. Change max memory limit to 12MB
5. Change default_charset to big5
6. Change doc_root to c:/inetpub/wwwroot
7. Enable MSSQL extension
8. Disable cgi.force-redirect (in PHP4.20)
9. Install ZendOptimizer
--
Edit bug report at http://bugs.php.net/?id=17551&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17551&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17551&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17551&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17551&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17551&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17551&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17551&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17551&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17551&r=globals