ID:               17551
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Bogus
 Bug Type:         Filesystem function related
 Operating System: Windows 2000 (IIS5.0)
 PHP Version:      4.2.0
 New Comment:

For me it looks like 4.2.x works as expected.. __FILE__
outputs the correct path there.




Previous Comments:
------------------------------------------------------------------------

[2002-05-31 23:48:29] [EMAIL PROTECTED]

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 this bug report at http://bugs.php.net/?id=17551&edit=1

Reply via email to