Doc #52847 [Asn->Csd]: Files to include are always searched for in current directory
| From: | aharvey@php.net | Date: | Wed, 15 Sep 2010 09:35:53 +0000 |
| Subject: | Doc #52847 [Asn->Csd]: Files to include are always searched for in current directory | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-5047@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52847&edit=1
ID: 52847
Updated by: aharvey@php.net
Reported by: mail_ben_schmidt at yahoo dot com dot au
Summary: Files to include are always searched for in current
directory
-Status: Assigned
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
Operating System: Mac OS X 10.6.2
PHP Version: 5.3.2
Assigned To: aharvey
Block user comment: N
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Previous Comments:
------------------------------------------------------------------------
[2010-09-15 11:35:37] aharvey@php.net
Automatic comment from SVN on behalf of aharvey
Revision: http://svn.php.net/viewvc/?view=revision&revision=303387
Log: Fix doc bug #52847 (Files to include are always searched for in
current
directory).
------------------------------------------------------------------------
[2010-09-15 11:32:42] aharvey@php.net
Ah, I see now. It's happening further up the call chain -- after
php_resolve_path() has failed to find anything using the include path,
_php_stream_open_wrapper_ex() tries the plain file stream, which does
look in the current working directory.
Nothing we can do about it in terms of behaviour; it's just part of
providing the option of including from URL streams. I'll document it.
------------------------------------------------------------------------
[2010-09-15 10:22:28] mail_ben_schmidt at yahoo dot com dot au
Please read this bug report more carefully. The included file is *not*
in "the directory the currently executing file lives in" which is what
#51569 addresses, and is the intended fallback behaviour. It is merely
in the current working directory. (For many SAPIs this is the same
initially, but not for the CLI, for instance, and not when a script has
been included from another script running in a different directory.) The
documentation suggests the current working directory will only be
searched if "." is in include_path. This is false. The current directory
is being searched anyway. I don't know if this is a behaviour or
documentation problem. (The directory where the current script lives is
being searched, too, but that is the subject of #51569, and undeniably a
documentation problem.)
------------------------------------------------------------------------
[2010-09-15 08:43:26] aharvey@php.net
This is intended behaviour: php_resolve_path() includes a fallback case
at the end to search the directory the currently executing file lives in
if all else fails.
I'll update the documentation. Duping to doc bug #51569.
------------------------------------------------------------------------
[2010-09-15 03:32:15] mail_ben_schmidt at yahoo dot com dot au
Actually, this may be a behaviour problem, not a documentation problem.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/bug.php?id=52847
--
Edit this bug report at http://bugs.php.net/bug.php?id=52847&edit=1