1

私は WAMP の下で Phalcon と Volt と仕事をしました。最近、私たちは別の開発環境 (CentOS) に移動し、そこには最新の Phalcon ビルドを備えた PHP 5.5.17 があります (2 つ下のバージョンもコンパイルしてテストしました)。

現在、Volt がカスタム関数を使用してテンプレートをコンパイルしようとすると、クラッシュします (PHP プロセス)。カスタムフィルターについても同様です。

Apacheのエラーログ

[Tue Sep 30 06:06:24.809476 2014] [proxy_fcgi:error] [pid 31199:tid 140596014397184] (104)Connection reset by peer: [client 10.0.2.2:53931] AH01075: Error dispatching request to :3080:
[Tue Sep 30 06:06:27.216226 2014] [proxy_fcgi:error] [pid 31200:tid 140596161255168] [client 10.0.2.2:53941] AH01067: Failed to read FastCGI header
[Tue Sep 30 06:06:27.216249 2014] [proxy_fcgi:error] [pid 31200:tid 140596161255168] (104)Connection reset by peer: [client 10.0.2.2:53941] AH01075: Error dispatching request to :3080:

PHP エラーログ

[30-Sep-2014 06:06:27] WARNING: [pool www] child 32519 exited on signal 11 (SIGSEGV - core dumped) after 204.725812 seconds from start
[30-Sep-2014 06:06:27] NOTICE: [pool www] child 32529 started

PHPコードは次のようになります

$di->set('view', function () use ($config) {
    $view = new View();
    $view->setViewsDir($config->application->viewsDir);
    $view->registerEngines(array(

            '.volt' => function ($view, $di) use ($config) {

                    $volt = new VoltEngine($view, $di);

                    $volt->setOptions(array(
                            'compiledPath' => $config->application->cacheDir,
                            'compiledSeparator' => '_',
                            'compileAlways' => $config->application->debug
                        ));

                    $compiler = $volt->getCompiler();


                    $compiler->addFunction(
                                        'last',
                                        function ($resolvedArgs) use ($compiler) {
                                           return 'array_pop('. $resolvedArgs .')';
                                        }
                    );

                    return $volt;
                }
        ));

    return $view;
}, true);

そして例えばボルトで

{{ last(['1', '2', '3']) }}

そして、私はかなり多くのカスタム関数があり、それらが必要であるため、この問題に本当に固執しました。デバッグしようとしましたが、ボルトがカスタム関数で行を解析しようとするとすぐに、プロセスが終了しました。

Phalcon バグが提出されました。解決策: 現在のビルドの xdebug を完全に無効にします。詳細はこちら: https://github.com/xdebug/xdebug/pull/120

4

0 に答える 0