#14251 [Ana->Ctl]: register_shutdown_function bug

From: Date: Tue, 03 Sep 2002 23:35:56 +0000
Subject: #14251 [Ana->Ctl]: register_shutdown_function bug
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-18364@lists.php.net to get a copy of this message
ID: 14251 Updated by: sniper@php.net Reported By: se@e-kazan.ru -Status: Analyzed +Status: Critical Bug Type: Scripting Engine problem Operating System: Linux Mandrake 8.0 PHP Version: 4.1.0 -Assigned To: +Assigned To: zeev New Comment: Another one related to #11831 Previous Comments: ------------------------------------------------------------------------ [2002-08-05 16:48:02] john@vbulletin.com I have reproduced this too on PHP 4.2.2 and Linux RH 6.2. However it does not seem to occur in Windows. Workaround by putting getcwd() into a global variable before shutdown then using chdir() in the shutdown_function. ------------------------------------------------------------------------ [2001-11-27 12:48:47] sniper@php.net Reproduced. Seems like cwd changes to / always. ------------------------------------------------------------------------ [2001-11-27 12:04:10] se@e-kazan.ru Current directory in main program body and into shutdown function is not same. Sometimes its changes to '/' or something else. Try to execute this script and reload page some times: <? set_time_limit(0); ignore_user_abort(0); function Test() { echo "Shutdown function: ", pwd; }; echo "Body: ", pwd; register_shutdown_function ("Test"); ?><BR> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=14251&edit=1

« previous php.bugs (#18364) next »