From:             serverprivacy at gmail dot com
Operating system: Windows XP Pro SP2
PHP version:      5.2.0RC1
PHP Bug Type:     *Directory/Filesystem functions
Bug description:  Relative Path Includes Broken

Description:
------------
Including a file using a relative path with a "." or "./" fails, giving a
"No such file or directory" error.

OS: Windows XP Pro SP2
PHP: 5.2.0RC2-dev
Web: Apache 2.2.2

Reproduce code:
---------------
All files are in the same directory.

test1.php
<?php
include("message.php");
?>

test2.php
<?php
include("./message.php");
?>

message.php
<?php
echo "Success";
?>

Expected result:
----------------
test1 and test2 should both produce "Success".

Actual result:
--------------
test1 is fine.
test2 gives the following error message:

Warning: include(./message.php) [function.include]: failed to open stream:
No such file or directory in C:\Apache\htdocs\test2.php on line 2

Warning: include() [function.include]: Failed opening './message.php' for
inclusion
(include_path='.;C:\Apache\PHP;C:\Apache\PHP\PEAR;C:\Apache\htdocs') in
C:\Apache\htdocs\test2.php on line 2

-- 
Edit bug report at http://bugs.php.net/?id=38232&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=38232&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=38232&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=38232&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=38232&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=38232&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=38232&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=38232&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=38232&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=38232&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=38232&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=38232&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=38232&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=38232&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=38232&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=38232&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=38232&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=38232&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=38232&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=38232&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=38232&r=mysqlcfg

Reply via email to