#38232 [Opn]: Relative Path Includes Broken

From: Date: Thu, 27 Jul 2006 09:39:12 +0000
Subject: #38232 [Opn]: Relative Path Includes Broken
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-99986@lists.php.net to get a copy of this message
ID: 38232 User updated by: serverprivacy at gmail dot com Reported By: serverprivacy at gmail dot com Status: Open Bug Type: *Directory/Filesystem functions Operating System: Windows XP Pro SP2 -PHP Version: 5.2.0RC1 +PHP Version: 5.2.0RC2-dev New Comment: Updated version, drop down box didn't have it listed. Previous Comments: ------------------------------------------------------------------------ [2006-07-27 09:31:38] serverprivacy at gmail dot com 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 this bug report at http://bugs.php.net/?id=38232&edit=1

« previous php.bugs (#99986) next »