Re: Re: Current working directory and multi-threaded environments

From: Date: Wed, 15 Mar 2000 19:38:41 +0000
Subject: Re: Re: Current working directory and multi-threaded environments
Groups: php.dev 
Request: Send a blank email to php-dev+get-16856@lists.php.net to get a copy of this message
>We are talking about reacting (getcwd) to an action by the server (chdir). That's not how I interpreted Andi's proposal. >I think we should always start with cwd = dirname(executing_script). I believe that both Unix and Windows maintain the notion of a current working directory on a per process basis. While PHP can run on multi-threaded web servers, there currently is a semaphore which prevents mutliple PHP scripts from running at the same time. If we were to ever want to enable multiple PHP scripts to run at the same time, PHP will have to get to the point where it no longer relies on the operating system of a current working directory, >(Perhaps the code fragment you posted does that.) What my code fragment does is to restore the server's notion of what the current working directory should be after PHP rudely changes it. - Sam Ruby

« previous php.dev (#16856) next »