#7642 [Com]: working directory not maintained in registered shutdown function
| From: | usenet0 at malkusch dot de | Date: | Tue, 20 May 2003 02:32:11 +0000 |
| Subject: | #7642 [Com]: working directory not maintained in registered shutdown function | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-40002@lists.php.net to get a copy of this message | ||
ID: 7642
Comment by: usenet0 at malkusch dot de
Reported By: kjackson at gpu dot srv dot ualberta dot ca
Status: Closed
Bug Type: Scripting Engine problem
Operating System: Linux
PHP Version: 4.0.3pl1
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2000-12-07 12:03:28] sniper@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] 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 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 http://bugs.php.net/?id=7642&edit=1