We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

App crashes when view is initialized

Hello, today I've started to create a new app with Phalcon 2. I've compiled the latest Phalcon 2 from GitHub source and installed it.

This is my code:

use Phalcon\Di\FactoryDefault;
use Phalcon\Mvc\View;
use Phalcon\Mvc\Application;

$di = new FactoryDefault();

$di->set('view', function () {
    $view = new View();
    $view->registerEngines(array(
       '.view' => 'Phalcon\Mvc\View\Engine\Volt'
    ));
    return $view;
});

$application = new Application($di);
echo $application->handle()->getContent();

When I don't initialize a view, an exception is thrown. That's ok.

But when i initialize the view, PHP (PHP Version 5.5.12-2ubuntu4.1) crashes with this error: [Tue Nov 11 22:36:55.954879 2014] [core:notice] [pid 14177] AH00051: child pid 14199 exit signal Segmentation fault (11), possible coredump in /etc/apache2

How can I solve this?



98.9k

Are you using Xdebug?



6.6k

Yes, Xdebug is available in my dev environment.



98.9k

Could you please try again with it disabled?



6.6k

It is working with Xdebug disabled, but how can i use Xdebug then?



98.9k
Accepted
answer

I think Xdebug 2.2.6 should work, this is the issue: https://github.com/xdebug/xdebug



6.6k
edited Nov '14

Ok I think I have to compile Xdebug by myself and can't use apt-get for this task. I'll try it tomorrow.

UPDATE: It's working! Thank you @Phalcon!