fopen zend wrapper and relative paths
| From: | Daniel BODEA | Date: | Fri, 31 May 2002 18:58:26 +0000 |
| Subject: | fopen zend wrapper and relative paths | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-84631@lists.php.net to get a copy of this message | ||
The bug #11326 was closed after Zeev added the current executing file's
directory to the search path, which solved half of the problem. The original
bug #9673 though is still open, and the last comment is pointing to the
other half of the problem, <dot> relative paths.
Right now, in main/streams.c/_php_stream_fopen_with_path the <dot> case is
dealt with right from the start and no other paths get expanded.
What I propose in order to conclude this matter, to get an intuitive
behavior and to remain fully compatible with older versions is to add only
the current executing file's directory _after_ the cwd of the main file for
<dot> path expansion.
This way the "include" and "live" parts of a project get fully decoupled,
nested includes work as expected (from everyone's perspective), no longer
the need to carry arround a "root" variable (anticipating that the user may
disregard the DOCUMENT_ROOT and install the product relative to something
else), and the language scales a little bit better.
I'm gonna start doing this right now if no one digs up any security problems
that refused to cross my mind.
D