Edit report at http://bugs.php.net/bug.php?id=53508&edit=1
ID: 53508
User updated by: exsystemchina at gmail dot com
Reported by: exsystemchina at gmail dot com
Summary: Class not found caused by require_once
Status: Open
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:
and something important i forgot to mention:
THIS WILL ONLY HAPPEN WHEN RUNNING THE SCRIPT, everything's all right
when
debugging.
Previous Comments:
------------------------------------------------------------------------
[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?
------------------------------------------------------------------------
[2010-12-14 13:17:34] exsystemchina at gmail dot com
//System.php
<?php
require_once 'Utilities.php';
class TJustTest {
public function __construct() {
var_dump(get_declared_classes());
}
}
interface IInterface {
public function Supports($AInterface);
}
class TObject implements IInterface {
public function Supports($AInterface) {
echo 'hi';
}
}
class TJustAnotherTest {
public function Foo() {
echo 'foo';
}
}
?>
//Utilities.php
<?php
require_once 'System.php';
class TSomethingBoring {
public function Boring() {
echo 'really boring';
}
}
$a=new TJustTest();
class TMustBeWrong extends TObject {
function Tragedy() {
echo 'this will not be seen.';
}
}
?>
Just run System.php to see the fatal error with other classes before
TObject loaded successfully
inside System.php
------------------------------------------------------------------------
[2010-12-14 13:14:52] exsystemchina at gmail dot com
ok, i have just know that a login is needed to download the zip
file.....
now i have shorten the buggy code.
------------------------------------------------------------------------
[2010-12-13 10:18:21] aharvey@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.
Please avoid embedding huge scripts into the report.
------------------------------------------------------------------------
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
http://bugs.php.net/bug.php?id=53508--
Edit this bug report at http://bugs.php.net/bug.php?id=53508&edit=1