Bug #14214 Updated: getcwd() and `pwd` return wrong directory
| From: | sander@php.net | Date: | Mon, 17 Dec 2001 12:14:32 +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-74122@lists.php.net to get a copy of this message | ||
ID: 14214
Updated by: sander
Reported By: ASkwar@DigitalProjects.com
Status: Feedback
Bug Type: Filesystem function related
Operating System: Linux
PHP Version: 4.0.6
New Comment:
No feedback. Closing.
Previous Comments:
------------------------------------------------------------------------
[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