Bug #14214 Updated: getcwd() and `pwd` return wrong directory

From: Date: Mon, 07 Jan 2002 10:35:25 +0000
Subject: Bug #14214 Updated: getcwd() and `pwd` return wrong directory
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-76152@lists.php.net to get a copy of this message
ID: 14214 Updated by: edink Reported By: ASkwar@DigitalProjects.com Status: Closed Bug Type: Filesystem function related Operating System: Linux PHP Version: 4.0.6 New Comment: For a descrioption of a problem and a solution plaese see: http://bugs.php.net/bug.php?id=14839 Previous Comments: ------------------------------------------------------------------------ [2002-01-07 02:22:47] lobbin@php.net Closed it should be. ------------------------------------------------------------------------ [2001-12-17 07:14:32] sander@php.net No feedback. Closing. ------------------------------------------------------------------------ [2001-11-26 02:44:36] derick@php.net What is your configure line? Derick ------------------------------------------------------------------------ [2001-11-24 18:47:19] ASkwar@DigitalProjects.com I've written a small shell script in PHP, which should return the current working directory: ----- #!/usr/bin/php -q <?php echo pwd; echo getcwd(); ?> ----- I've stored the script as /scripts/test.php and on the shell, I'm in /scripts/Testing. When I run the script with »../test.php«, it returns »/scripts« two times. I'd expect it to return »/scripts/Testing« two times. However, HTTP_ENV_VARS['PWD'] and HTTP_SERVER_VARS['PWD'] both contain the correct (ie. /scripts/Testing) path. ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=14214&edit=1

« previous php.dev (#76152) next »