PHP 4.0 Bug #7642 Updated: working directory not maintained in registered shutdown function
| From: | kjackson at gpu dot srv dot ualberta dot ca | Date: | Sun, 05 Nov 2000 21:15:46 +0000 |
| Subject: | PHP 4.0 Bug #7642 Updated: working directory not maintained in registered shutdown function | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-37203@lists.php.net to get a copy of this message | ||
ID: 7642
User Update by: kjackson@gpu.srv.ualberta.ca
Status: Feedback
Bug Type: Unknown/Other Function
Description: working directory not maintained in registered shutdown function
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.
Previous Comments:
---------------------------------------------------------------------------
[2000-11-05 06:34:11] stas@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@gpu.srv.ualberta.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.
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=7642