ID:               40661
 Comment by:       development at domain51 dot com
 Reported By:      [EMAIL PROTECTED]
 Status:           Assigned
 Bug Type:         Apache related
 Operating System: Linux
 PHP Version:      5.2.3, 4.4.7
 Assigned To:      jani
 New Comment:

I can confirm this bug still exists on OSX with PHP 5.2.5.


Previous Comments:
------------------------------------------------------------------------

[2007-10-10 08:52:24] pcdinh at gmail dot com

This bug can be reproducible in PHP 5.2.4 and PHP 5.2.5 dev. When
getcwd() is called in the context of shutdown function, it seems that
getcwd() returns the server root (e.x: apache server installation
directory)

------------------------------------------------------------------------

[2007-07-11 12:35:37] [EMAIL PROTECTED]

Making sure this doesn't slip through the cracks..also found in PHP 5.2

------------------------------------------------------------------------

[2007-02-27 15:00:13] [EMAIL PROTECTED]

I disagree, there is no reason why PHP can't reset the CWD to the
correct directory when a shutdown handler is run. That is what I would
expect to happen.

------------------------------------------------------------------------

[2007-02-27 14:54:34] [EMAIL PROTECTED]

See http://bugs.php.net/bug.php?id=36529

------------------------------------------------------------------------

[2007-02-27 14:44:41] [EMAIL PROTECTED]

Description:
------------
When this script is run with the Apache1 sapi the second CWD is reset
to /.

This is an issue for both php 4.4.4 and php 5.2.1rc3.

Reproduce code:
---------------
<?php
echo "CWD = ", getcwd(), "\n";

function handler()
{
    echo "CWD = ", getcwd(), "\n";
    echo dirname( __FILE__ ), "\n";
}

register_shutdown_function( 'handler' );
?>




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=40661&edit=1

Reply via email to