#34371 [Opn->Bgs]: Incorrect working directory in some callback functions.

From: Date: Mon, 05 Sep 2005 06:08:02 +0000
Subject: #34371 [Opn->Bgs]: Incorrect working directory in some callback functions.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-84529@lists.php.net to get a copy of this message
ID: 34371 Updated by: derick@php.net Reported By: hightman2 at yahoo dot com dot cn -Status: Open +Status: Bogus Bug Type: Apache related Operating System: Linux PHP Version: 4.4.0 New Comment: Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Thank you for your interest in PHP. . Previous Comments: ------------------------------------------------------------------------ [2005-09-05 06:06:52] hightman2 at yahoo dot com dot cn Description: ------------ When the callback functions was called by register_shutdown_function(), ob_start(); the current working directory will be changed to the root directory (such as '/'). Notice: bug found when running the script under web browser. Reproduce code: --------------- <?php function test_cb() { echo getcwd() . "<br>\n"; } register_shutdown_function("test_cb"); test_cb(); ?> Expected result: ---------------- /home/hightman/public_html/my_php4<br> /home/hightman/public_html/my_php4<br> Actual result: -------------- /home/hightman/public_html/my_php4<br> /<br> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34371&edit=1

« previous php.bugs (#84529) next »