NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
dbg-cli on linux -- basic q's


Joined: 13 May 2004
Posts: 2
Reply with quote
Hi.

I'm trying to get some basic debugging working under Linux. I've properly installed the dbg module and dbg-cli. Some select output from php -i is:

Quote:

This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
with DBG v2.11.23, (C) 2000,2001,2002,2003, by Dmitri Dmitrienko


[snip...]
Quote:

dbg

<TABLE BORDER=1 CELLPADDING=3 CELLSPACING=0 WIDTH=600 BGCOLOR=#33CCFF ALIGN="CENTER"><TR VALIGN='MIDDLE' ALIGN='CENTER'><TD><B><A HREF='http://www.nusphere.com/dbg' STYLE='color: #660880;'>DBG php debugger, version 2.11.23, Copyright 2001, 2002, Dmitri Dmitrienko, www.nusphere.com/dbg</A></B></TD></TR></TABLE><BR>

Version => 2.11.23
Linked => as a shared library.
Profiler => compiled, enabled

Directive => Local Value => Master Value
debugger.enable_session_cookie => On => On
debugger.enabled => On => On
debugger.fail_silently => On => On
debugger.ignore_nops => Off => Off
debugger.JIT_enabled => Off => Off
debugger.JIT_host => clienthost => clienthost
debugger.JIT_level => 3 => 3
debugger.JIT_port => 7869 => 7869
debugger.profiler_enabled => On => On
debugger.session_nocache => On => On
debugger.timeout_seconds => 300 => 300


So, it's pretty clear that it's properly installed. For now, all I want to do is debug a silly little command-line script called 'foo.php'. The file assigns a couple of arrays and prints one out. However, I can't view the source in dbg-cli, step through it, or even run it:

    DBG php debugger, version 2.11.0, Copyright 2000, 2003, Dmitri Dmitrienko, www.nusphere.com/dbg
    dbg>file foo.php
    Reading symbols from /extra/home/user/foo.php...done.
    dbg>show cgiexec
    php.
    dbg>set cgiexec /usr/bin/php4
    dbg>show cgiexec
    /usr/bin/php4.
    dbg>run

    Program exited.
    Session start timeout has expired.
    Program is not being run.
    dbg>list
    dbg>


This is what the script should do:

    % /usr/bin/php4 -f foo.php
    Array
    (
    [0] => x
    [1] => y
    )




I'm obviously missing something basic. Can anyone tell me what's going on?

Thanks,
/lulumuz/
View user's profileFind all posts by lulumuzSend private message


Joined: 02 Aug 2004
Posts: 1
Reply with quote
Hi,

Did you ever find a solution? I'm having the same problem.

Joey
View user's profileFind all posts by 020543mSend private message
No answer


Joined: 13 May 2004
Posts: 2
Reply with quote
I didn't receive an answer.
View user's profileFind all posts by lulumuzSend private message
Don't hold your breath


Joined: 03 Aug 2004
Posts: 1
Reply with quote
I have bumped into many of the problems found on this board trying to get this <stuff> to work ! The instructions are as clear as stagnant swamp water .. mut be deliberate !
View user's profileFind all posts by evilcSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
I'll take a closer look into dbg-cli stuff soon. It's not been touched for many months now. You know it's a free product and therefore its priority for me is the lowest. I do support and update this project after all the main branch (dbg 2.16) is done for PHPED IDE which you probably know too does not use dbg-cli but dbglistener as a client side library.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
i've the same problem


Joined: 14 Jul 2004
Posts: 2
Reply with quote
Few weeks ago i installed succesfully the dbg module in my php interpreter and the dbg-cli. Almost i didn't have problems installing them but when i tryed to check a simple php script using Apache i got:

Program exited.
Session start timeout has expired.
Program is not being run

i did:

dbg>set mode 1
dbg>set mapurlroot http://localhost/
dbg>set mapremoteroot /home/http/htdocs
dbg>set maplocalroot /home/http/htdocs
dbg>file /home/http/htdocs/htph/info.php
Reading symbols from /home/http/htdocs/htph/info.php...done.
dbg>run

i think that my php.ini are correct:

extension=dbg.so

[Debugger]
debugger.enabled=On
debugger.profiler_enabled=On
debugger.hosts_allow=127.0.0.1,10.0.0.12
debugger.hosts_deny=None
debugger.ports=7869


with telnet and netstat i could verify that the port 7869 is closed, i think
that dbg listener can't bind the port.
I've linux redhat 7.3 with apache 1.3.29 and php 4.3.4
View user's profileFind all posts by ylapinSend private message


Joined: 07 Aug 2004
Posts: 2
Location: France
Reply with quote
ddmitrie wrote:
I'll take a closer look into dbg-cli stuff soon. It's not been touched for many months now. You know it's a free product and therefore its priority for me is the lowest. I do support and update this project after all the main branch (dbg 2.16) is done for PHPED IDE which you probably know too does not use dbg-cli but dbglistener as a client side library.


Understood.

I feel that the problem is actually with dbg 2.11.x causing php to die, rather than with dbg-cli per se. What I'm seeing here (dbg-2.11.26/dbg-cli 2.11.0 built on OSX 10.3.4, apache 2 and php5.0.0) is consistent php crashes when starting php.

For the moment, I'm going back to apd or xdebug, as, as it stands, the free version of dbg is useless for me. And, not being a windows person, the full version is out of the question. Shame, really, as it looks really good on paper.

Simon

_________________
Your mouse has moved. You must restart Windows NT for this change to be recognised.
View user's profileFind all posts by tuftySend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
Hi Simon,

I understand your concerns, but could you post some more details on what crashes you encountered ? Did you go with standard procedures described on www.php.net regarding getting backtrace in gdb ? Just do it then we'll see _what_ caused apache to crash.

BTW, neither Apache 2 nor php5 can be considered stable. Especially the pair. You may look at the php forums to see how many people experienced problems with php running under Apache 2...

Regarding dbg, it runs very stable and no crashes (even sporadic) are discovered. Thousands of people who are using dbg in their everyday works wouldn't leave me a chance to not know of such crashes should they appear in dbg Smile
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 15 Oct 2004
Posts: 8
Reply with quote
I have a Debian Sid client and server here. phpinfo shows the right stuff.

dbg>show mode
off.
dbg>set mode 1
dbg>show mode
off.
dbg>

So "set mode 1" doesn't do anything
"set mode on" does do something, but I'm not sure what.

The default port the client listens on is not the same as the one the module talks to so we have to change that too.

dbg>set port 7869
dbg>set mode on
dbg>set mapurlroot http://host/
dbg>set maplocalroot /local/root/
dbg>set mapremoteroot /remote/root/
dbg>file /local/root/it.php
Reading symbols from /local/root/it.php...done.
dbg>run

Program exited.
Wrong session request passed
Program is not being run.
dbg>

what does that mean??
View user's profileFind all posts by noidSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
check server's version of dbg. It should match the client version.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 15 Oct 2004
Posts: 8
Reply with quote
[quote="ddmitrie"]check server's version of dbg. It should match the client version.[/quote]
Same version, 2.11.30
View user's profileFind all posts by noidSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
Please look at the Apache logs and let me know what actual request was run.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
dbg-cli on linux -- basic q's
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 2  

  
  
 Reply to topic