php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37833 __autoload not invoked recursively for parent classes
Submitted: 2006-06-17 19:01 UTC Modified: 2006-06-18 12:17 UTC
From: rafael dot amador at gmail dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.1.4 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rafael dot amador at gmail dot com
New email:
PHP Version: OS:

 

 [2006-06-17 19:01 UTC] rafael dot amador at gmail dot com
Description:
------------
in PHP Version 5.1.4 (ISAPI) / IIS 5.1 

... i've 4 files:

----------------------------------------------------------
1.- menu.php - the user interface php page since i'm including  "config.php", here exist a line named "$ses = new session();" the file isn't included but i hope that __autoload find it.
 
2.- config.php - a declared __autoload function exists to search all my posibles file paths.

3.- session.php - session class resides here but is descendant from a class named DBConn in this form:

class session extends DBConn{
...
}

the include to DBConn.php isn't present (hoping that __autoload find it again).

4.- DBConn.php - where the parent class resides.

class DBConn{
...
}
--------------------------------------------------------

where i call "$ses = session();" the session seccessfully loads session.php but doesn't find the parent class file.

i put some echo("") to the __autoload function to see if this function is loaded recursively, but it doesn't. now 
my question is ... is a bug or i'm doing something wrong!

Expected result:
----------------
to load my entire script without error

Actual result:
--------------
Fatal error: Class 'DBConn' not found in X:\Inetpub\wwwroot\...\scripts\server\session.php on line 31

Fatal error: Class 'session' not found in X:\Inetpub\wwwroot\...\menu.php on line 5

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-18 00:13 UTC] rafael dot amador at gmail dot com
sorry i did a mistake
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 28 20:01:31 2024 UTC