#40679 [NEW]: problems with $class_name in __autoload

From: Date: Thu, 01 Mar 2007 10:03:41 +0000
Subject: #40679 [NEW]: problems with $class_name in __autoload
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-109740@lists.php.net to get a copy of this message
From: habeck at gmx dot de Operating system: windows 2003 / apache 2.2.4 PHP version: 5.2.1 PHP Bug Type: Reproducible crash Bug description: problems with $class_name in __autoload 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 bug report at http://bugs.php.net/?id=40679&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40679&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40679&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40679&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40679&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40679&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40679&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=40679&r=needscript Try newer version: http://bugs.php.net/fix.php?id=40679&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40679&r=support Expected behavior: http://bugs.php.net/fix.php?id=40679&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40679&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40679&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40679&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40679&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40679&r=dst IIS Stability: http://bugs.php.net/fix.php?id=40679&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40679&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40679&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40679&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=40679&r=mysqlcfg

« previous php.bugs (#109740) next »