#50159 [Opn->Asn]: wrong working directory in symlinked files

From: Date: Thu, 12 Nov 2009 17:02:07 +0000
Subject: #50159 [Opn->Asn]: wrong working directory in symlinked files
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-144540@lists.php.net to get a copy of this message
ID: 50159 Updated by: jani@php.net Reported By: cweiske@php.net -Status: Open +Status: Assigned Bug Type: *General Issues -Operating System: ??? +Operating System: * PHP Version: 5.3.1RC3 -Assigned To: +Assigned To: dmitry New Comment: Dmitry, I think this patch of yours caused this: http://svn.php.net/viewvc?view=revision&revision=263055 Any comments? Previous Comments: ------------------------------------------------------------------------ [2009-11-12 16:44:52] jani@php.net See also bug #46814 (reported for 5.2.8 actually..) ------------------------------------------------------------------------ [2009-11-12 16:44:40] cweiske@php.net sapi is fastcgi ------------------------------------------------------------------------ [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

« previous php.bugs (#144540) next »