Runkit:在Linux服务器上不起作用

时间:2009-07-09 15:45:46

标签: php runkit

我有一个PECL :: Runkit的问题,这个小例子

index.php contain <?php
runkit_import('a.php');
runkit_import('b.php');
Doublon::get();

a.php et b.php每个包含相同的代码

class Doublon
{
static function get() { echo "class " . __FILE__; }
}

在我的电脑上(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,但错误是相同的

提前致谢,Cédric

2 个答案:

答案 0 :(得分:1)

The Package site说:

WARNING: 0.9 does not compile with PHP 5.2+ so use the CVS version instead.

您使用的是CVS版本吗?

答案 1 :(得分:0)

可以在http://github.com/zenovich/runkit

上找到最新的runkit扩展

无论如何,正如我所知,runkit从未有过在导入时定义新类的功能。它只能添加或更改现有类的成员。如果您确实需要此功能,可以在http://github.com/zenovich/runkit

上打开功能请求

要确定为什么在平台上获得不同的结果,我需要知道它们的runkit和PHP版本。您可以使用命令'php -i'获取所有信息。

相关问题