Bug #64028 [Opn->Fbk]: include_path starting with "." doesn't actually start the search in current dir
| From: | aharvey@php.net | Date: | Mon, 21 Jan 2013 01:11:53 +0000 |
| Subject: | Bug #64028 [Opn->Fbk]: include_path starting with "." doesn't actually start the search in current dir | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-176139@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=64028&edit=1
ID: 64028
Updated by: aharvey@php.net
Reported by: mike at kristopeit dot com
Summary: include_path starting with "." doesn't actually
start the search in current dir
-Status: Open
+Status: Feedback
Type: Bug
-Package: Dynamic loading
+Package: Scripting Engine problem
Operating System: CentOS
PHP Version: 5.3.21
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2013-01-18 22:10:54] mike at kristopeit dot com
Description:
------------
i have code that runs via the command line... the php include path is set to
".:/some/dir"
that code does an
include("file.php");
for a file that is in the same directory. that file is included correctly.
then in "file.php" i have
include("another_file.php");
for another file in the same directory... but there is also a file at
/some/dir/another_file.php...
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.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64028&edit=1