#31570 [Com]: PHP unable to resolve relative paths in __destruct() upon unloading page
| From: | wooptoo at gmail dot com | Date: | Sat, 24 Oct 2009 19:37:24 +0000 |
| Subject: | #31570 [Com]: PHP unable to resolve relative paths in __destruct() upon unloading page | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-143903@lists.php.net to get a copy of this message | ||
ID: 31570
Comment by: wooptoo at gmail dot com
Reported By: twadzilla at gmail dot com
Status: No Feedback
Bug Type: Scripting Engine problem
Operating System: Redhat 9
PHP Version: 5CVS-2005-01-16
New Comment:
I am experiencing this bug too in PHP 5.3.0 on Linux x86_64.
I run Apache with PHP as a module. PHP changes root to / on __destruct.
Previous Comments:
------------------------------------------------------------------------
[2008-04-24 17:32:46] inspiretheweb at googlemail dot com
This problem still exists in PHP 5.2.5 (Mac OS X, Apache 2.2), and is
quite a nuisance to be honest.
It seems to be due to the fact that the current working directory
changes to '/' before object-destructors are called (at least under
Apache).
Although this is noted at
http://php.net/manual/en/language.oop5.decon.php,
I think that object
destructors should be called before any changes are made to the current
working directory.
For developers who are unaware of this behavior, it is going to be
quite difficult for them to debug the issue in their application. If for
any reason this behavior is not going to change, it should at least be
displayed as a warning in the PHP manual, rather than a small notice.
------------------------------------------------------------------------
[2006-05-25 01:19:58] paul at stunning-stuff dot com
Hi,
I'm using PHP 5.1.4 and this bug still exists.
Including or requiring a file in the destructor using a relative path
spits out an error.
It seems to me that any user-made code, including destructors should
always be called before PHP cleans up anything.
Thanks,
Paul
------------------------------------------------------------------------
[2005-05-02 01:00:05] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2005-04-24 16:50:45] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
[2005-01-19 08:42:12] twadzilla at gmail dot com
The line in foo.php: $absolute = "/home/test/www/$abs";
should be: $absolute = "/home/test/www/$relative";
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/31570
--
Edit this bug report at http://bugs.php.net/?id=31570&edit=1