0

この小さな例で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、Wampにバンドルされたrunkit DLL)では動作し、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

1 つの問題: runkit の make テストで 100% のテストが失敗しましたが、その理由はまだわかりません。Linux ディストリビューションの runkit バージョンでは、Apache がクラッシュするだけです: PHP の起動: タイムゾーン データベースが破損しています

xdebugを落とし、php 5.2.9に戻しましたが、エラーは同じです

前もって感謝します、セドリック

4

2 に答える 2

0

最新の runkit 拡張機能は、http ://github.com/zenovich/runkit にあります。

とにかく、私が知っているように、runkit にはインポート時に新しいクラスを定義する機能がありませんでした。既存のクラスのメンバーを追加または変更することしかできません。本当にこれが必要な場合は、 http: //github.com/zenovich/runkitで機能リクエストを開くことができます

プラットフォームで異なる結果が得られる理由を判断するには、両方の runkit と PHP のバージョンを知る必要があります。コマンド「php -i」を使用してすべての情報を取得できます。

于 2012-09-08T21:17:07.277 に答える