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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2026 The PHP Group
All rights reserved.
Last updated: Thu Apr 16 14:00:02 2026 UTC