From:             cwei...@php.net
Operating system: 
PHP version:      5.3.1RC3
PHP Bug Type:     *General Issues
Bug description:  wrong working directory in symlinked files

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 bug report at http://bugs.php.net/?id=50159&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=50159&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=50159&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=50159&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=50159&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=50159&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=50159&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=50159&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=50159&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=50159&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=50159&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=50159&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=50159&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=50159&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=50159&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=50159&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=50159&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=50159&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=50159&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=50159&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=50159&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=50159&r=mysqlcfg

Reply via email to