Edit report at https://bugs.php.net/bug.php?id=7642&edit=1

 ID:                 7642
 Comment by:         nat at nath dot is
 Reported by:        kjackson at gpu dot srv dot ualberta dot ca
 Summary:            working directory not maintained in registered
                     shutdown function
 Status:             Closed
 Type:               Bug
 Package:            Scripting Engine problem
 Operating System:   Linux
 PHP Version:        4.0.3pl1
 Block user comment: N
 Private report:     N

 New Comment:

This is still found in PHP 5.3


Previous Comments:
------------------------------------------------------------------------
[2003-05-19 21:32:10] usenet0 at malkusch dot de

It seems, that this Bug still exists. 
I'm Using 4.2.3 on Linux. 
And the shutdown function still changes to / 
 
I tested it, by mailing me the CWD in the shutdown function.

------------------------------------------------------------------------
[2000-12-07 12:03:28] sni...@php.net

Reopen, if this still happens when using latest snapshot
from http://snaps.php.net/

--Jani

------------------------------------------------------------------------
[2000-11-05 16:15:46] kjackson at gpu dot srv dot ualberta dot ca

Yes, it is 4.03pl1.

Here is a link to my sample page with a phpinfo() call as well:

http://www.biology.ualberta.ca/jackson.hp/IWR/_temp.php

One more note, "/dir1" in my case happens to be a nfs mounted filesystem.

------------------------------------------------------------------------
[2000-11-05 06:34:11] s...@php.net

Failed to reproduce it on current version. Could you please check version at 
snaps.php.net if this is still happening?

------------------------------------------------------------------------
[2000-11-04 22:46:12] kjackson at gpu dot srv dot ualberta dot ca

Fox example, the current script is "/dir1/dir2/test.php"...

register_shutdown_function("shutDown");
$cwd = getcwd();
function shutDown()
{
        global $cwd;
        $fp = fopen("/dir1/dir2/temp.txt", "w");
        fwrite($fp, $cwd."\n".getcwd());
        fclose($fp);
}

Run it and view "temp.txt". You will find that the current working directory 
changes from "/dir1/dir2/" to "/". This was not the case in php 3.0.8, and I 
presume to be a bug.

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



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

Reply via email to