NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Session start timeout with dbg-cli


Joined: 15 Jan 2004
Posts: 7
Reply with quote
On a RH9 machine running php 4.3.4, I get the session timeout trying to debug a php script in cli mode on a local machine:

Code:

$ dbg-cli
DBG php debugger, version 2.11.0, Copyright 2000, 2003, Dmitri Dmitrienko, www.nusphere.com/dbg
dbg>file phpinfo.php
Reading symbols from /home/jks/data/learn/php/phpinfo.php...done.
dbg>run

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


phpinfo() says PHP has the debugger installed:

Code:

$ php -i
...
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
    with Zend Extension Manager v1.0.0, Copyright (c) 2003, by Zend Technologies
    with Zend Optimizer v2.1.0, Copyright (c) 1998-2003, by Zend Technologies
...


php.ini has the following dbg items:

Code:

...
extension=dbg.so

[Debugger]
debugger.enabled=On
debugger.profiler_enabled=On

...

[Zend]
zend_optimizer.optimization_level=15
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-2.1.0
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-2.1.0
zend_extension=/usr/lib/php4/dbg.so
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so



I saw a couple of other posts at zend-optimizer-and-debugging-problem-t214.html and segfaults-using-dbg-t169.html that led me to modify my the Zend section of my php.ini and try it without the optimizer:

Code:
[Zend]
zend_extension=/usr/lib/php4/dbg.so


I got the same problem, and I also tried it after commenting out the Zend section completely. In both cases, I still get the debugger registering as follows after a php -i, but still the timeout:

Code:
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


Any ideas on what I could be doing wrong?
View user's profileFind all posts by probertsSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Did you set HTTP mode, Root URL and Root remote directory ?
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 15 Jan 2004
Posts: 7
Reply with quote
No. Do I need to do this for debugging scripts in PHP CLI mode? I'm trying first to debug PHP CLI-mode scripts using dbg-cli, and when those work, move on to debugging scripts running within Apache using dbg-cli. Then when I can do that, I'm going to try debugging scripts running in Apache on a remote server using dbg-cli.

Maybe I'm misunderstanding the debugger. Does dbg-cli support debugging PHP CLI-mode scripts, or do they all need to be running in an Apache server?

Thanks for the help.
View user's profileFind all posts by probertsSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
It supports two modes. HTTP and direct.
In first case, it opens HTTP connection using supplied URL, in latter case it runs whatsoever found as php binary. You may set your own cgihandler or direct dbg-cli to run anything else. It uses CGI protocol and passes the request through environment variables, appropriately. Not sure if it works with non-CGI php binary, yet.
Anyways, if dbg-cli runs through Apache or using php directly, you have to make sure the dbg module is installed and enabled.

From your post I see that the settings are okay but please check DBG section in phpinfo() to see if debugger is enabled. If you don't see DBG section at all, please change php.ini settings and have there extension=dbg.so instead of zend_extension=dbg.so
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 15 Jan 2004
Posts: 7
Reply with quote
I was using Apache 2.0, and I read some concerns about that so I downgraded to Apache 1.3.29 and got the same problem.

The debugger is installed:

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


and loaded:

Quote:

DBG php debugger, version 2.11.23, Copyright 2001, 2002, Dmitri Dmitrienko, www.nusphere.com/dbg

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


I try to debug the file and get the following:

Code:

dbg>set mode 1
dbg>set mapurlroot http://localhost/
dbg>set mapremoteroot /usr/local/apache/htdocs/
dbg>set maplocalroot /usr/local/apache/htdocs/
dbg>file /usr/local/apache/htdocs/phpinfo.php
Reading symbols from /usr/local/apache/htdocs/phpinfo.php...done.
dbg>run

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


At this point I have tried debugging a script both through Apache and the simple way described in the README from the source distribution of dbg-cli-2.11.0:

Quote:

After you invoke dbg-cli, you may want to open a script and step though it

dbg>file myfile.php
dbg>run
dbg>step


Any ideas?
View user's profileFind all posts by probertsSend private message
Is the CLI using the correct port?


Joined: 15 Jan 2004
Posts: 7
Reply with quote
Could this be a port problem?
View user's profileFind all posts by probertsSend private message
Same problem here.


Joined: 28 Jan 2004
Posts: 1
Reply with quote
Hi

I have the same problem. I am runing Redhat Linux 9. PHP (4.3.2) is a module in Apache. I have the dbg module installed and verified through phpinfo();. I started the dbg-cli in the same machine in a shell window and set the mode, mapurlroot, mapremoteroot, maplocalroot. It gave me the "start timeout has expired" error message. What else can I try ? Is there a way to get more information on why dbg-cli times out ? Has anyone had any success with this set up ?
View user's profileFind all posts by ljouSend private message


Joined: 15 Feb 2004
Posts: 3
Reply with quote
Has there been any solution to this?

dbg-cli version 2.11.0
dbg version 2.11.23
mod_php version 4.3.4
Apache2 version 2.0.48
View user's profileFind all posts by volkrisSend private messageAIM Address
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Last time I compiled dbg-cli, I was using gcc 2.96.
With gcc 3.x I got some weird problems and seems not all of them are solved.
I'll get back after I find a solution.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
aHA!


Joined: 15 Feb 2004
Posts: 3
Reply with quote
Found my problem.

I was setting mode to 1 instead of to on.

The documentation really should be corrected...
View user's profileFind all posts by volkrisSend private messageAIM Address
Session start timeout with dbg-cli
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 1  

  
  
 Reply to topic