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

PHEd & Phalcon - anyone else?

Hi,

I wonder if anyone's developing with Phalcon in PHPEd & dbg debugger module?

I'm experiencing terrible problems with it - constant segfaults and so on..

I wonder if anyone's developing with Phalcon in PHPEd & dbg debugger module?

I'm experiencing terrible problems with it - constant segfaults and so on..

What version of DBG and Phalcon are you on?

Do you have to have a debugger session active to trigger the crashes?

-- S.



51.3k

There are multiple combinations of version of PHP, Phalcon and DBG that fail. And there are some that work.

For example, PHPEd v12 with latest 1.3.2 with 5.5.11 crashes my debug sessions.

However, debugger seems to be fine with a mid-January commit on 1.3.0 branch with PHP 5.5.1.

It's really hard to pinpoint & reproduce as simple "hello world" type of scripts work fine.

For example, PHPEd v12 with latest 1.3.2 with 5.5.11 crashes my debug sessions.

However, debugger seems to be fine with a mid-January commit on 1.3.0 branch with PHP 5.5.1.

OK, I'll keep you posted if I see it -- I am a longtime PhpEd and of late a Phalcon user, but I haven't actually opened a DBG session with Phalcon loading at the same time, I don't think.

I'm also on PHP 5.4 x64 and PhpEd 7 still, so may be hard to repro.

-- S.



15.1k

Never had any issues with PhpEd and phalcon. Apache + phalcon + php 5.4 on v12 and now v13.



51.3k

@nazwa

Please let me know if you upgrade to PHP 5.5. Maybe you'll be able to help me figure it out..

Actually, can we test your PHPEd with DBG module installed on my server?

Thanks, Temuri



15.1k
edited May '14

Ha, this is interesting, it doesn;t work now. I think there is a general problem in Phalcon 1.3.x with session adapters. I already reported an issue with it last week here https://github.com/phalcon/cphalcon/issues/2398 , and what we are seeing here is just another side of the same bug.

Debugging works like a charm except for when I try to create a session adapter. The following code is all i need to crash the debugger:

<?php       
    $session = new Phalcon\Session\Adapter\Files();               
    $session->start();

    var_dump($session->getOptions());             

?>


51.3k

Yep.

That's what I'm seeing too. I know exact commit ID that introduced this problem. I'm collecting more info now, will updating you with results.

Cheers!



51.3k

Try this:

  1. Check out latest 1.3.2
  2. edit ext/session/adapter.c
  3. comment out line #405 and #416 - if (!nusphere_dbg_present) {
  4. compile from ext/ with: phpize .clean && phpize && ./configure CFLAGS="-O0 -g3" CC=gcc && make -j4 && sudo make install

That fixes session and PHPEd 13/dbg 6.2.8 works fine.

Let me know if that works for you too.



15.1k

I'm not set up to compile phalcon at the moment, so can't test it right away. I'll have a look over the weekend, but I'm quite impressed that there is nusphere debugger integration within phalocn itself :D



51.3k

heheh the only reason "nusphere" is in the codebase - it is me.

I kept bugging one of the devs, cuz at that moment there was a nasty bug that was crashing debugging. So he put that workaround in there :-)



15.1k

Haha that makes sense. On the other hand, I'm glad to see that there are other people using phped. Always thought I'm the only one :)



51.3k

I've been using PHPEd since version 5 or so. I still don't understand how people can use xdebug.