Why getcwd() returs different results?
am 05.11.2009 02:36:26 von Raymond Irving
--0-1997688062-1257384986=:44818
Content-Type: text/plain; charset=us-ascii
Hello,
The getcwd() method returns a different path when called from inside a shutdown function under Apache. On windows IIS it works just fine.
Can't this be fixed so that the path returned is consistent across servers?
It would appear that PHP should set the CWD path before calling the shut down functions
__
Raymond Irving
--0-1997688062-1257384986=:44818--
Re: Why getcwd() returs different results?
am 05.11.2009 12:09:19 von Ashley Sheridan
--=-qsulivHytEruUz+en6Z9
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
On Wed, 2009-11-04 at 17:36 -0800, Raymond Irving wrote:
> Hello,
>
> The getcwd() method returns a different path when called from inside a shutdown function under Apache. On windows IIS it works just fine.
>
> Can't this be fixed so that the path returned is consistent across servers?
>
> It would appear that PHP should set the CWD path before calling the shut down functions
>
> __
> Raymond Irving
What shutdown functions are you meaning? Do you have an example which
shows the problem?
Thanks,
Ash
http://www.ashleysheridan.co.uk
--=-qsulivHytEruUz+en6Z9--
Re: Why getcwd() returs different results?
am 06.11.2009 02:53:04 von Raymond Irving
--0-717953641-1257472384=:62044
Content-Type: text/plain; charset=us-ascii
Here's an example from the PHP website:
This demonstrates the behaviour:
function echocwd() { echo 'cwd: ', getcwd(), "\n"; }
echocwd();
register_shutdown_function('echocwd');
?>
Outputs:
cwd: /path/to/my/site/docroot/test
cwd: /
http://php.net/manual/en/function.register-shutdown-function .php
It's a known problem but I can't see why this can't be fixed
________________________________
From: Ashley Sheridan
To: Raymond Irving
Cc: PHP-General List
Sent: Thu, November 5, 2009 6:09:19 AM
Subject: Re: [PHP] Why getcwd() returs different results?
On Wed, 2009-11-04 at 17:36 -0800, Raymond Irving wrote:
Hello,
>
>The getcwd() method returns a different path when called from inside a shutdown function under Apache. On windows IIS it works just fine.
>
>Can't this be fixed so that the path returned is consistent across servers?
>
>It would appear that PHP should set the CWD path before calling the shut down functions
>
>__
>Raymond Irving
>
What shutdown functions are you meaning? Do you have an example which shows the problem?
Thanks,
Ash
http://www.ashleysheridan.co.uk
--0-717953641-1257472384=:62044--