Re: Re: Current working directory and multi-threaded environments
| From: | Andi Gutmans | Date: | Thu, 16 Mar 2000 05:19:05 +0000 |
| Subject: | Re: Re: Current working directory and multi-threaded environments | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-16873@lists.php.net to get a copy of this message | ||
At 04:14 PM 3/15/00 -0500, rubys@us.ibm.com wrote:
Are you saying that if we write new thread-safe virtual_chdir() and virtual_getcwd() functions and substitute the ones existing in PHP things won't work? I very much disagree with you. Anyway, most places in PHP that open files use fopen-wrappers.c so they will automatically work later on. If there are any places which don't use them (there really shouldn't be very many if any at all), we will have another function for them char *virtual_get_fullpath(char *filepath) which will return the fullpath to a filepath. Andi --- Andi Gutmans <andi@zend.com> http://www.zend.com/executingI believe that today the cwd is the directory which contains theascript. Take a look at fopen-wrappers.c. This behavior is important toI don't think so. The cwd seems to be taken from getcwd() and not from the executing scripts filename. Look at expand_filepath(). expand_filepath is only used to locate the script. Once the script is located, the php_fopen_primary_script (in CGI) and send_php (in Apache) do the dirty deed.number of people.