#34234 [NEW]: document root in __destruction

From: Date: Wed, 24 Aug 2005 12:26:02 +0000
Subject: #34234 [NEW]: document root in __destruction
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-83940@lists.php.net to get a copy of this message
From: ur001 at mail dot ru Operating system: windows 2000 PHP version: 5.0.4 PHP Bug Type: Apache2 related Bug description: document root in __destruction Description: ------------ Sorry for my English, i'm from Russia in __destruct(): 1) PHP is CGI - all ok 2) PHP as Apache Module - Document Root = Server Root and i can't get access to my files: file(), dir(), fopen() doesn't work ("failed to open stream: No such file or directory in...") Reproduce code: --------------- function listdir($msg){ print "<hr><b>$msg</b><hr><pre>"; print realpath(".")."\r\n</pre>"; } class A{ function __construct() {listdir("__construct");} function __destruct() {listdir("__destruct"); } function f() {listdir("f()"); } } $a=new A(); $a->f(); Expected result: ---------------- -------------------- __construct -------------------- C:\hosts\web2.ru -------------------- f() -------------------- C:\hosts\web2.ru -------------------- __destruct -------------------- C:\hosts\web2.ru Actual result: -------------- -------------------- __construct -------------------- C:\hosts\web2.ru -------------------- f() -------------------- C:\hosts\web2.ru -------------------- __destruct -------------------- C:\Apache\Apache2 -- Edit bug report at http://bugs.php.net/?id=34234&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34234&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34234&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34234&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=34234&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=34234&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34234&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34234&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34234&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34234&r=support Expected behavior: http://bugs.php.net/fix.php?id=34234&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34234&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34234&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=34234&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34234&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=34234&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34234&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34234&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34234&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34234&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34234&r=mysqlcfg

« previous php.bugs (#83940) next »