php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20514 change of behaviour of function getcwd() ?
Submitted: 2002-11-20 05:27 UTC Modified: 2002-12-01 16:56 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: erwan at barzhoneg dot com Assigned: ilia (profile)
Status: Not a bug Package: Directory function related
PHP Version: 4.3.0RC1 OS: win32
Private report: No CVE-ID: None
 [2002-11-20 05:27 UTC] erwan at barzhoneg dot com
It occurs on my IIS5/win2k/PHP4.3.0rc1 (from the binary distrib):
when I use an include , the function getcwd returns the directory of the include and not the directory of the main page.

in previous PHP versions, this was not the case : the getcwd() would always return the directory of the main page.

E.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-20 05:53 UTC] nicos@php.net
Yes, this is new and wanted.
getcwd is returning the current __FILE__ directory.
 [2002-11-20 06:16 UTC] cynic@php.net
I couldn't find any related messages in php-dev@. when/where was this change discussed?
 [2002-11-20 06:18 UTC] derick@php.net
What is the exact name of the executable you use?
And can you run it with the -v option to show it?

Derick
 [2002-11-20 07:23 UTC] nicos@php.net
This was discussed when we've got the bug in include() and require() with symlinks. Wez and ilia decided this if I'm remembering well.
 [2002-11-20 09:11 UTC] erwan at barzhoneg dot com
for info :

D:\php-4.3.0-Win32>php-cgi.exe -v
PHP 4.3.0RC1 (cgi-fcgi), Copyright (c) 1997-2002 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies
 [2002-12-01 16:47 UTC] sniper@php.net
Ilia practically begged to get this assigned to him..

 [2002-12-01 16:56 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

As most of us know Win32 does not have symlinks so that's clearly of no relevance to this bug report. The code in TSRM responsible for fetching the current directory via getcwd() has been the same since it was first written , revision (1.1). Thus, I must conclude that the behavior had NOT changed and therefor this bug is bogus.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Oct 25 09:01:23 2020 UTC