#34206 [Opn->Bgs]: cwd set to server root (?) in __destruct
| From: | sniper@php.net | Date: | Sun, 21 Aug 2005 23:02:18 +0000 |
| Subject: | #34206 [Opn->Bgs]: cwd set to server root (?) in __destruct | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-83857@lists.php.net to get a copy of this message | ||
ID: 34206
Updated by: sniper@php.net
Reported By: maniac_warlord at web dot de
-Status: Open
+Status: Bogus
Bug Type: Class/Object related
Operating System: Windows XP / Linux
PHP Version: 5.0.4
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Previous Comments:
------------------------------------------------------------------------
[2005-08-21 19:11:26] maniac_warlord at web dot de
Description:
------------
cwd is set to server root (i guess) instead of called php file's
directory in __destruct()
it probably isn't server root (see results), because that would be /www
on linux - on windows it is
Reproduce code:
---------------
<?php
class Foo
{
public function bar()
{
echo getcwd() . "\n";
}
public function __destruct()
{
$this->bar();
}
}
$f = new Foo();
$f->bar();
?>
Expected result:
----------------
Windows XP:
F:\htdocs
F:\htdocs
My webhoster's linux:
/www/htdocs/[some number]
/www/htdocs/[some number]
(or whatever directory the file is in)
Actual result:
--------------
Windows XP:
F:\htdocs
D:\Apache\Apache 2
My webhoster's linux:
/www/htdocs/[some number]
/
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34206&edit=1