#50386 [Opn->Bgs]: Strange realpath() behavior in shutdown functions

From: Date: Sat, 05 Dec 2009 17:26:27 +0000
Subject: #50386 [Opn->Bgs]: Strange realpath() behavior in shutdown functions
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-145441@lists.php.net to get a copy of this message
 ID:               50386
 Updated by:       jani@php.net
 Reported By:      dzlatanov at softproekt dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         *Directory/Filesystem functions
 Operating System: Linux / Windows
 PHP Version:      5.2.11
 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:
------------------------------------------------------------------------

[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)

« previous php.bugs (#145441) next »