NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
DBG Not working with PHPEdit - Session Start Timeout


Joined: 25 Jul 2003
Posts: 4
Reply with quote
PHPEdit v0.7.1.130 on Windows XP
PHP 4.32RC4 on RedHat 9 (PHP not installed on Windows box running PHPEdit)
DBG 2.11.23 (server and client)

I installed DBG into my Linux PHP and validated from phpinfo that it is working properly:

dbg
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 On On
debugger.JIT_host 172.21.1.100 172.21.1.100
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

One thing I was not clear on but have tried both is the setting for JIT_host. I have tried the IP of my Windows box (remember this is DBG setup on Linux) and also left it as clienthost for auto-detect. Neither seemed to work.

I then installed the client dbgListenter and went to configure it.

By the way, the Linux server is 172.21.1.102 and the Windows box where I am running the client and PHPEdit is 172.21.1.100. So, I setup the JIT_host on Linux to point to the Windows XP box running the client.

When I then do setup for the DBGListener client, it has a dropdown list which shows 172.21.1.100 and 172.138.39.76. I am not sure where the second address comes from but doing a ping -a shows that both are pointing to my Windows XP box.

The Listener shows that it started and seems to be fine.

Only other odd thing is that the IDE COM Class shows PHPEdit IDE for DBG 2.11.5 when I installed 2.11.23. I assume that is a DBG error since i never had DBG installed before on this box.

When I then try and debug from PHPEdit (verified debug settings and it says "Everything appears ok", it comes back after 3 seconds or so and says Session start timeout has expired. Why?

Any ideas?

I have struggled with this for over a week. I can see how PHPEdit should be able to talk to the Windows DBGListener process but how is that process talking to the PHP Engine running on my Linux box?

Thanks,
Scott
View user's profileFind all posts by SForsgrenSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
JIT is a feature of some native code debuggers. Generally, it means that it's possible to start debugging of a life application when it troubled.
With non JIT debugger you have to start debugger, load application, run it under debugger and try to reproduce bug. With JIT you can launch & attach debugger to a running application just in time when the bug happened.
JIT is nothing more than that. Just In Time.
Now how it works with DBG.
If your script caused Warning or Error and JIT is enabled, DBG agent attempts to start debug session with host you have set in debugger.JIT_host using TCP port you've set in debugger.JIT_port.
Normally you should either leave both debugger.JIT_port & debugger.JIT_host empty or set there clienthost and 7869 respectively. which is the same as if you left them empty.
Explicit setting of ip=172.21.1.100 orders DBG agent to start JIT debugging with specified host only, regardless the HTTP request is originated from. With clienthost setting DBG agent determines client address automatically.

As you see JIT works when no debug request was done from any client. It triggers automatically when your script causes a error or warning. More precisely, you can select what problem can trigger JIT session by setting JIT_level. Following values are supported:

0 (NO)
1 (E_CORE)
2 (ERR_LEVEL1_MASK | E_ERROR | E_PARSE | E_COMPILE_ERROR | E_USER_ERROR)
3 (E_ALL & ~(E_NOTICE | E_USER_NOTICE))
4 (E_ALL)

Now a bit about "PHPEdit IDE for DBG 2.11.5"
It's just an ID under which PHPEdit has registered itself as a client IDE for DbgListener. I have nothing to do with that.

Now a bit about "Session start timeout has expired"
I'm not developer for PHPEdit and don't know why it caused the trouble.
First you'd make sure that any actual HTTP request has made from the client when you clieck Run in PHPEdit. See apache access.log.
If there is no request, you'd check IDE settings.
If there is a request, you'd check if DbgListener has a log message for that. If there is no message, you'd check if DbgListener is accessible from the server. Just lauch server console and try telnet 172.21.1.100 7869
or telnet 172.138.39.76 7869 depending on what one IP address you use for accessing your server. Most probably the first one. In this case you'd have it selected in the DbgListener settings.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
DBG Not working with PHPEdit - Session Start Timeout


Joined: 25 Jul 2003
Posts: 4
Reply with quote
On my Linux box with PHP, DBG Server I can telnet to 172.21.1.100 7869 and though it doesn't respond with anything, I do not get connection refused like if I pick another port. So, it seems to listen.

If I check the DBGListener window, it shows that 172.21.1.102 which is my Linux box connected and disconnected. So, it seems that the server physically can talk to the client listener.

What I am missing is how the PHPEdit works with DBGListener. If I start in debug mode, it must be doing something to allow me to step through code, etc. other than just JIT debugging, right?

Thanks for your patience!
View user's profileFind all posts by SForsgrenSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Fine. It means that dbg connection can be made and should run.
Also, it means that dbg is most probably not involved at all.

To check the final thing make sure that IDE actually runs anything on the site when you try to launch debug session. Just inspect apache access logs to see if there is anything like DBGSESSID in HTTP GET requests.

If nothing like that you have to check IDE settings and probably make a post in some different forum(s). This one is dedicated to DBG debugger and issues arount it.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 25 Nov 2014
Posts: 4
Reply with quote
Sad Sad Sad Sad Sad Sad
View user's profileFind all posts by tongclub48Send private message


Joined: 25 Nov 2014
Posts: 4
Reply with quote
I installed DBG into my Linux PHP and validated from phpinfo that it is working properly:


View user's profileFind all posts by tongclub48Send private message
DBG Not working with PHPEdit - Session Start Timeout
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