From: rafael dot amador at gmail dot com
Operating system: Windows XP
PHP version: 5.1.4
PHP Bug Type: Scripting Engine problem
Bug description: __autoload not invoked recursively for parent classes
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
--
Edit bug report at http://bugs.php.net/?id=37833&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=37833&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=37833&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=37833&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=37833&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=37833&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=37833&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=37833&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=37833&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=37833&r=support
Expected behavior: http://bugs.php.net/fix.php?id=37833&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=37833&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=37833&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=37833&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37833&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=37833&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=37833&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=37833&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=37833&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=37833&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=37833&r=mysqlcfg