#29345 [Fbk->Opn]: Working directory has changed
| From: | jeroen at kessels dot com | Date: | Fri, 30 Jul 2004 00:21:02 +0000 |
| Subject: | #29345 [Fbk->Opn]: Working directory has changed | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-63796@lists.php.net to get a copy of this message | ||
ID: 29345
User updated by: jeroen at kessels dot com
Reported By: jeroen at kessels dot com
-Status: Feedback
+Status: Open
Bug Type: Filesystem function related
Operating System: Windows 2000
PHP Version: 5.0.0
New Comment:
Ah! Yes, changing to "php-cgi.exe" solves the problem. I followed the
manual installation instructions (the "install.txt" file in the ZIP
download), which clearly say to use "php.exe". I guess it needs to be
rewritten. I can't find any information about the "php-cgi.exe"
program, not there and not on this website.
Previous Comments:
------------------------------------------------------------------------
[2004-07-30 00:38:58] edink@php.net
Which sapi are you using? If its cgi please make sure to use
php-cgi.exe
------------------------------------------------------------------------
[2004-07-23 01:24:24] jeroen at kessels dot com
Description:
------------
In PHP4 the working directory is the directory where the script lives.
In PHP5 it's the root of the website. This has a huge impact on scripts
that use the filesystem functions to access local files.
For example, the getcwd() function in a script called
"c:/inetpub/wwwroot/work/test.php" will report
"c:\inetpub\wwwroot\work" on PHP4, and "c:\inetpub\wwwroot" on PHP5.
I have only Windows 2000 with IIS at my disposal, I've not tested on
Linux and Apache.
Reproduce code:
---------------
echo getcwd();
Expected result:
----------------
The directory where the script lives.
Actual result:
--------------
The home directory of the website.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29345&edit=1