From:             jeroen at kessels dot com
Operating system: Windows 2000
PHP version:      5.0.0
PHP Bug Type:     Filesystem function related
Bug description:  Working directory has changed

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 bug report at http://bugs.php.net/?id=29345&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29345&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29345&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=29345&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=29345&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=29345&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=29345&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=29345&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=29345&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=29345&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=29345&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=29345&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=29345&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29345&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=29345&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=29345&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=29345&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29345&r=float

Reply via email to