#50386 [Bgs]: Strange realpath() behavior in shutdown functions
ID: 50386
User updated by: dzlatanov at softproekt dot com
Reported By: dzlatanov at softproekt dot com
Status: Bogus
Bug Type: *Directory/Filesystem functions
Operating System: Linux / Windows
PHP Version: 5.2.11
New Comment:
Thank you for this clarification. I had checked the manual before
posting this bug. I was not able to find anything related to different
realpath() behavior in shutdown functions when PHP is configured to run
as CGI or as Apache module however.
I would still consider this strange, as the same code might not perform
in the same way when executed on different machines, provided that there
are no configuration options to avoid it.
Previous Comments:
------------------------------------------------------------------------
[2009-12-05 17:26:26] jani@php.net
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
------------------------------------------------------------------------
[2009-12-04 14:16:00] dzlatanov at softproekt dot com
Description:
------------
I noticed that realpath() function does not return the same result when
called during the regular script execution and in the shutdown process.
This behavior only appears when PHP is running as Apache module, but
not in CGI/FastCGI mode.
Tested with PHP 5.2.6, 5.3.0, 4.4.8.
Reproduce code:
---------------
<?php
function MyShutdownFunc() {
echo realpath("./") . "<br />";
}
MyShutdownFunc();
register_shutdown_function("MyShutdownFunc");
?>
Expected result:
----------------
/www/mysite.com/staging/root
/www/mysite.com/staging/root
Actual result:
--------------
/www/mysite.com/staging/root
/
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50386&edit=1
Thread (3 messages)