#40661 [Opn->Bgs]: cwd is reset when shutdown handler runs

From: Date: Tue, 27 Feb 2007 14:54:34 +0000
Subject: #40661 [Opn->Bgs]: cwd is reset when shutdown handler runs
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-109660@lists.php.net to get a copy of this message
ID: 40661 Updated by: tony2001@php.net Reported By: derick@php.net -Status: Open +Status: Bogus Bug Type: *Directory/Filesystem functions Operating System: Linux PHP Version: 4CVS-2007-02-27 (CVS) New Comment: See http://bugs.php.net/bug.php?id=36529 Previous Comments: ------------------------------------------------------------------------ [2007-02-27 14:44:41] derick@php.net 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

« previous php.bugs (#109660) next »