#14251 [Opn->Csd]: register_shutdown_function bug
| From: | vrana@php.net | Date: | Fri, 27 Aug 2004 09:35:59 +0000 |
| Subject: | #14251 [Opn->Csd]: register_shutdown_function bug | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969363532@lists.php.net to get a copy of this message | ||
ID: 14251
Updated by: vrana@php.net
Reported By: se at e-kazan dot ru
-Status: Open
+Status: Closed
Bug Type: Documentation problem
Operating System: Linux Mandrake 8.0
PHP Version: 4.1.0
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
"Working directory of the script can change inside the shutdown
function under some web servers, e.g. Apache."
Previous Comments:
------------------------------------------------------------------------
[2003-02-25 02:44:09] sniper@php.net
It's Apache that changes the pwd, not PHP.
------------------------------------------------------------------------
[2002-11-12 08:19:19] x at x dot anon
It's very serios bug. Try this samle and try to find out 'out.txt'
file.
<?
set_time_limit(0);
ignore_user_abort(0);
function Test()
{
$fp = fopen ('out.txt', 'w');
fwrite ($fp, 'TEST');;
fclose ($fp);
};
register_shutdown_function ("Test");
?>
------------------------------------------------------------------------
[2002-09-19 21:07:31] sniper@php.net
IIRC (!) this was some problem with the cwd funcs in TSRM.
Can't remember now what exactly it was..
(it works in windows but not in *nix)
------------------------------------------------------------------------
[2002-09-19 11:08:13] zeev@php.net
This isn't related to #11831.
It has to do with the fact that by the time we're shutting down, we're
no longer in the request context, but rather, in Apache's shutdown
context. Apache is probably changing directory to / at this stage.
I'm not sure why this is tagged as critical, I'm not sure whether this
should be 'fixed'. My recommendation is to move it to 'Analyzed'
status.
------------------------------------------------------------------------
[2002-09-03 18:35:56] sniper@php.net
Another one related to #11831
------------------------------------------------------------------------
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/14251
--
Edit this bug report at http://bugs.php.net/?id=14251&edit=1