php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34234 document root in __destruction
Submitted: 2005-08-24 14:26 UTC Modified: 2005-08-24 14:48 UTC
From: ur001 at mail dot ru Assigned:
Status: Not a bug Package: Apache2 related
PHP Version: 5.0.4 OS: windows 2000
Private report: No CVE-ID: None
 [2005-08-24 14:26 UTC] ur001 at mail dot ru
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



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-24 14:48 UTC] sniper@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jul 05 09:01:29 2024 UTC