#50159 [Opn]: wrong working directory in symlinked files
| From: | cweiske@php.net | Date: | Thu, 12 Nov 2009 16:44:40 +0000 |
| Subject: | #50159 [Opn]: wrong working directory in symlinked files | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-144538@lists.php.net to get a copy of this message | ||
ID: 50159
Updated by: cweiske@php.net
Reported By: cweiske@php.net
Status: Open
Bug Type: *General Issues
-Operating System:
+Operating System: debian 5.0
PHP Version: 5.3.1RC3
New Comment:
sapi is fastcgi
Previous Comments:
------------------------------------------------------------------------
[2009-11-12 16:43:52] jani@php.net
See also bug #49456
------------------------------------------------------------------------
[2009-11-12 16:24:55] pajoye@php.net
Related to #49456. Which is expected given the changes applied to
realpath and related functions.
------------------------------------------------------------------------
[2009-11-12 15:39:14] cweiske@php.net
Description:
------------
getcwd() and the current working directory does not work correctly
anymore on php 5.3.0 and 5.3.1RCx when executing a symlinked file.
In php versions before 5.3.0, the current working directory of a file
was the directory below the document root of the web server. in 5.3.0,
it's the target directory of the symlinked file.
Imagine the following file layout:
/var/www/host/ - webserver document root
/var/www/host/config.php
/var/www/host/index.php - symlink to /usr/share/app/index.php
When opening index.php, getcwd() returns /usr/share/app/ in 5.3.0 and
5.3.1rc(1|2|3), while it returned /var/www/host/ on 5.2.x.
This change causes real problems because now it is impossible to share
application code easily among installations!
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50159&edit=1