Bug #53508 [Nab]: Class not found caused by require_once

From: Date: Wed, 25 Feb 2015 19:54:40 +0000
Subject: Bug #53508 [Nab]: Class not found caused by require_once
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-190947@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=53508&edit=1 ID: 53508 Updated by: requinix@php.net Reported by: exsystemchina at gmail dot com Summary: Class not found caused by require_once Status: Not a bug Type: Bug Package: Scripting Engine problem Operating System: Mac OS X 10.6 PHP Version: 5.3.3 Block user comment: N Private report: N New Comment: @sky: As stas said three years ago, the require() will execute Utilities.php as the first thing, except that file needs something System.php defined, except that hasn't happened yet because PHP is still doing the require. The execution is out of order. The dependency is that Utilities.php needs System.php, therefore Utilities.php must require() System.php. Not the other way around. Previous Comments: ------------------------------------------------------------------------ [2015-02-25 16:44:48] sky at stebnicki dot net How is this not a bug? I am experiencing the same thing and it very much looks like a bug to me. ------------------------------------------------------------------------ [2012-02-26 08:19:34] stas@php.net Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. TObject is not yet defined at the time TMustBeWrong line is executed, since require is executed before TObject definition is executed. I would suggest cleaning up the code and getting includes (requires) in proper order. ------------------------------------------------------------------------ [2010-12-22 06:47:31] exsystemchina at gmail dot com and something important i forgot to mention: THIS WILL ONLY HAPPEN WHEN RUNNING THE SCRIPT, everything's all right when debugging. ------------------------------------------------------------------------ [2010-12-20 03:55:08] exsystemchina at gmail dot com no cacher is installed. ------------------------------------------------------------------------ [2010-12-20 03:34:25] kalle@php.net You don't happen to have any opcode cachers like APC installed? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=53508 -- Edit this bug report at https://bugs.php.net/bug.php?id=53508&edit=1

« previous php.bugs (#190947) next »