Date: 03/15/00
- Next message: rubys <email protected>: "Re: [PHP-DEV] Re: Current working directory and multi-threaded environments"
- Previous message: Sascha Schumann: "Re: [PHP-DEV] Re: Current working directory and multi-threaded environments"
- In reply to: rubys <email protected>: "Re: [PHP-DEV] Re: Current working directory and multi-threaded environments"
- Next in thread: rubys <email protected>: "Re: [PHP-DEV] Re: Current working directory and multi-threaded environments"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
At 03:42 PM 3/15/00 -0500, rubys <email protected> wrote:
> > Today the cwd is the initial cwd of the
> > process and not of the executing script (unless I'm wrong, which is very
> > possible).
>
>I believe that today the cwd is the directory which contains the executing
>script. Take a look at fopen-wrappers.c. This behavior is important to a
>number of people.
I don't think so. The cwd seems to be taken from getcwd() and not from the
executing scripts filename. Look at expand_filepath(). My suggestion should
not change the behavior for anyone because it won't be changing the code
nor logic in fopen_wrappers.c but only the chdir() and getcwd() calls used
in there and would return the same result, but do it differently behind the
scenes.
>Retaining the current behavior is a bit more involved than simply saving
>the virtual path away some place. Every place in which a user can enter a
>relative path will need to be examined.
There aren't many such places. The relative path calculations are done
mostly in php_realpath and fopen_wrappers. These places will automatically
work. There are very few other places in PHP where people can give paths to
files and not go via these calls. But yes, that is why we talked about also
supporting a virtual_get_filepath() function which would return a full path
from a relative part in order to fix those places.
Andi
--- Andi Gutmans <andi <email protected>> http://www.zend.com/-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: rubys <email protected>: "Re: [PHP-DEV] Re: Current working directory and multi-threaded environments"
- Previous message: Sascha Schumann: "Re: [PHP-DEV] Re: Current working directory and multi-threaded environments"
- In reply to: rubys <email protected>: "Re: [PHP-DEV] Re: Current working directory and multi-threaded environments"
- Next in thread: rubys <email protected>: "Re: [PHP-DEV] Re: Current working directory and multi-threaded environments"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

