【发布时间】:2009-07-09 15:45:46
【问题描述】:
我在这个小例子中遇到了 PECL::Runkit 的问题
index.php contain <?php
runkit_import('a.php');
runkit_import('b.php');
Doublon::get();
a.php 和 b.php 每个都包含相同的代码
class Doublon
{
static function get() { echo "class " . __FILE__; }
}
在我的 PC 上(Windows XP、Wampserver 2、php 5.2.9-2、runkit DLL 与 Wamp)它工作和 index.php 显示
class C:\wamp2\www\utilitaires\essais\runkit\b.php
在我的 Linux CentOS 5 服务器上,PHP 5.2.10,手动编译的 Runkit
Warning: runkit_import() [function.runkit-import]: class doublon not
found in /shares/public/cedric/test/index.php on line 2
Warning: runkit_import() [function.runkit-import]: Cannot redeclare
class doublon in /shares/public/cedric/test/index.php on line 2
Warning: runkit_import() [function.runkit-import]: class doublon not
found in /shares/public/cedric/test/index.php on line 3
Warning: runkit_import() [function.runkit-import]: Cannot redeclare
class doublon in /shares/public/cedric/test/index.php on line 3
Fatal error: Class 'Doublon' not found in
/shares/public/cedric/test/index.php on line 4
一个问题:runkit 的 make test 给我 100% 的测试失败,但我仍然不知道为什么。 来自 linux 发行版的 runkit 版本只会使 Apache 崩溃: PHP Startup: Timezone database is corrupt
我放弃了xdebug,回到php 5.2.9,但是还是一样的错误
提前致谢,塞德里克
【问题讨论】: