Runkit:不适用于 Linux 服务器
我对 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测试给我100%的测试失败,但我仍然不知道为什么。 Linux 发行版中的 runkit 版本只会导致 Apache 崩溃: PHP 启动:时区数据库已损坏
我删除了 xdebug,返回到 php 5.2。 9,但错误是相同的
提前致谢,Cédric
I have a problem with PECL::Runkit with this little example
index.php contain <?php
runkit_import('a.php');
runkit_import('b.php');
Doublon::get();
a.php et b.php each contain the same code
class Doublon
{
static function get() { echo "class " . __FILE__; }
}
On my PC (Windows XP, Wampserver 2, php 5.2.9-2, runkit DLL bundled with
Wamp) it work and index.php show
class C:\wamp2\www\utilitaires\essais\runkit\b.php
On my Linux CentOS 5 server, PHP 5.2.10, Runkit compiled by hand
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
One problem : runkit's make test give me 100% of tests failed, but I still don't know why.
The runkit version from the linux distribution just make crash Apache :
PHP Startup: Timezone database is corrupt
I dropped xdebug, return to php 5.2.9, but the errors are the same
Thanks in advance, Cédric
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Package 站点 说:
您使用的是 CVS 版本吗?
The Package site says:
Are you using the CVS version?
最新的 runkit 扩展可以在 http://github.com/zenovich/runkit 上找到
不管怎样,据我所知,runkit 从来没有在导入时定义新类的功能。 它只能添加或更改现有类的成员。 如果您确实想要这个,您可以在 http://github.com/zenovich/runkit
为了确定为什么在您的平台上得到不同的结果,我需要知道这两个平台的 runkit 和 PHP 版本。 您可以使用命令“php -i”获取所有信息。
The up-to-date runkit extension can be found on http://github.com/zenovich/runkit
Anyway, as I know, runkit never had a feature to define new class on importing. It only can add or change members of existing classes. If you really want this, you can open the feature-request on http://github.com/zenovich/runkit
To determine why you get different results on your platforms, I need to know the versions of runkit and PHP for both of them. You can get all the information using the command 'php -i'.