#42626 [Opn->Bgs]: file operations in destructor cause weird results
| From: | vrana@php.net | Date: | Mon, 10 Nov 2008 11:14:22 +0000 |
| Subject: | #42626 [Opn->Bgs]: file operations in destructor cause weird results | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-1471@lists.php.net to get a copy of this message | ||
ID: 42626
Updated by: vrana@php.net
Reported By: admin at ifyouwantblood dot de
-Status: Open
+Status: Bogus
Bug Type: Documentation problem
Operating System: Windows XP SP2
PHP Version: 5.2.4
New Comment:
Already documented: "The working directory in the script shutdown phase
can be different with some SAPIs (e.g. Apache)." at
http://www.php.net/manual/en/language.oop5.decon.php
Previous Comments:
------------------------------------------------------------------------
[2007-11-24 12:26:02] jani@php.net
Reclassified as documentation issue.
------------------------------------------------------------------------
[2007-10-25 19:29:42] admin at ifyouwantblood dot de
allright guys it should be mentioned somewhere that the destructor's
base directory is the root of the server. so this 'bug' is not a bug,
but a simple mistake which could have been avoided just by telling
this....
the given sample searches for the file in the base directory of the
server. unfortunatly i had had a file there with the name 'datei.txt'
which then was read by/written to by php.
but to my reassurance none of the developers seems to know this, or
else they would have said something, wouldn't they?
so, if any one ever reads this, where can i communicate with the PHP
Manual team in order to tell this (and something else)?
greetings.
------------------------------------------------------------------------
[2007-10-22 21:58:38] admin at ifyouwantblood dot de
hi,
now i get the following with windows 5.2.5RC2 build Oct 22 2007
12:03:56 althought the file exists (but with size 0):
--------------------------
filesize after truncate: 0
Destructing test
filesize before clearstatcache: 0
Warning: filesize() [function.filesize]: stat failed for datei.txt in
F:\php\htdocs\ALL\bug.php on line 30
filesize after clearstatcache:
Warning: fopen(datei.txt) [function.fopen]: failed to open stream: No
such file or directory in F:\php\htdocs\ALL\bug.php on line 32
---------------------------
------------------------------------------------------------------------
[2007-10-22 11:23:01] jani@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows (zip):
http://snaps.php.net/win32/php5.2-win32-latest.zip
For Windows (installer):
http://snaps.php.net/win32/php5.2-win32-installer-latest.msi
------------------------------------------------------------------------
[2007-09-12 00:14:41] admin at tifyouwantblood dot de
this works as expected on PHP 5.2.2 on SunOS.
------------------------------------------------------------------------
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/42626
--
Edit this bug report at http://bugs.php.net/?id=42626&edit=1