|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64028 include_path starting with "." doesn't actually start the search in current dir
Submitted: 2013-01-18 22:10 UTC Modified: 2013-02-18 00:36 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: mike at kristopeit dot com Assigned:
Status: No Feedback Package: Scripting Engine problem
PHP Version: 5.3.21 OS: CentOS
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2013-01-18 22:10 UTC] mike at kristopeit dot com
i have code that runs via the command line... the php include path is set to 

that code does an
for a file that is in the same directory.  that file is included correctly.

then in "file.php" i have
for another file in the same directory... but there is also a file at 

using a backtrace log i see that the /some/dir/another_file.php is being included 
instead of the file in the current directory.

i changed the include("another_file.php"); to be include("./another_file.php");, 
and now everything works.

this is a pretty obvious bug. 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-01-21 01:11 UTC]
I can't reproduce this, but bear in mind that . doesn't mean "the directory of the file PHP is currently executing", but rather "the current working directory of the process". Which directory are you invoking PHP in, and what does echo getcwd(); indicate your current working directory is before your include? Is it /some/dir or the directory file.php is in?

If that all seems right, I suspect we'll need a self contained reproduce script from you.
 [2013-01-21 01:11 UTC]
-Status: Open +Status: Feedback -Package: Dynamic loading +Package: Scripting Engine problem
 [2013-02-18 00:36 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jun 25 08:01:29 2024 UTC