|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38232 Relative Path Includes Broken
Submitted: 2006-07-27 09:31 UTC Modified: 2006-09-23 10:05 UTC
Avg. Score:5.0 ± 0.0
Reproduced:8 of 8 (100.0%)
Same Version:8 (100.0%)
Same OS:8 (100.0%)
From: serverprivacy at gmail dot com Assigned:
Status: Not a bug Package: *Directory/Filesystem functions
PHP Version: 5.2.0RC2-dev OS: Windows XP Pro SP2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: serverprivacy at gmail dot com
New email:
PHP Version: OS:


 [2006-07-27 09:31 UTC] serverprivacy at gmail dot com
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.



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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-07-27 09:39 UTC] serverprivacy at gmail dot com
Updated version, drop down box didn't have it listed.
 [2006-09-22 08:29 UTC]
You aren't running the apache2filter SAPI by any chance?
 [2006-09-22 23:54 UTC] serverprivacy at gmail dot com
I don't really know what that is, but according to my phpinfo(), yes I am using it. "Server API Apache 2.0 Filter"
 [2006-09-23 10:05 UTC]
Dupe of bug#38904
(marking this as bogus as the other is already assigned)
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Feb 04 00:03:40 2023 UTC