#40679 [Opn]: problems with $class_name in __autoload
| From: | habeck at gmx dot de | Date: | Thu, 01 Mar 2007 10:56:36 +0000 |
| Subject: | #40679 [Opn]: problems with $class_name in __autoload | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-109742@lists.php.net to get a copy of this message | ||
ID: 40679
User updated by: habeck at gmx dot de
Reported By: habeck at gmx dot de
Status: Open
Bug Type: Reproducible crash
Operating System: windows 2003 / apache 2.2.4
PHP Version: 5.2.1
New Comment:
same error on windows 2003 with apache 2.0.59
Previous Comments:
------------------------------------------------------------------------
[2007-03-01 10:03:41] habeck at gmx dot de
Description:
------------
I have also problems with __autoload on windows 2003 apache 2.2.4/php
5.2.1. The following function does not what it did in apache 2.0.x and
earlier versions of php:
function __autoload($class_name) {
require_once(KH_APP_LIBPATH.$class_name.'.php');
}
The errormessage:
PHP Fatal error: require_once(): Failed opening required
'D:/xxx/xxx/.php' (include_path='./;D:/xxx/xxx/') in
D:\xxx\xxx\index.php on line 6
So there seems to be no value for $classname.
Reproduce code:
---------------
function __autoload($class_name) {
require_once(KH_APP_LIBPATH.$class_name.'.php');
}
Expected result:
----------------
Opening the classfile: D:/xxx/xxx/blah.php
Actual result:
--------------
PHP Fatal error: require_once(): Failed opening required
'D:/xxx/xxx/.php' (include_path='./;D:/xxx/xxx/') in
D:\xxx\xxx\index.php on line 6
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40679&edit=1