NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Failed to start debug session


Joined: 15 Jan 2004
Posts: 7
Reply with quote
I have been trying to get a debug session working over the internet between a PHP/Apache server and an eval of PHPEd. I have seen this product working on my local machine, but it needs to work over the internet.

I am trying to start the debugger with a url:

Quote:

http://servername/page.php?DBGSESSID=1@clienthost:7869


But the debugger continues to fail with the following message:

Quote:

DBG

Failed to start debug session

reason:
connection to the client address NN.NNN.NN.NNN:7869 is not allowed


I first tried ssh tunnelling in order to have security, then I tried a direct connection by adding my client host ip to the hosts_allow, and have finally gone to hosts_allow=ALL in order to try to coax this debugger into debugging. I have verified that I can telnet to the debug listener on my client host port 7869 from the server, and that works fine. So the listener is sitting there waiting for a connection from the server.

But dbg will not connect.

Why?

I have Nusphere PHPEd Version 3.2.1 Build 3239eval running on a RedHat client. On the server, I have PHP version 4.3.2., and the dbg.so-4.3.2, showing up in phpinfo() as version 2.14.10 -- the one that came with the eval. My config in php.ini is as follows:

Code:

[debugger]
debugger.enabled = On
debugger.profiler_enabled = On
debugger.hosts_allow = ALL
;debugger.hosts_deny = ALL
debugger.ports = 7870
debugger.fail_silently = Off


This is only the current config; I have tried many other configs, shutting down and rebooting apache each time.

One additional piece of information, I have run tcpdump to examine any packets coming into the clienthost, and nothing comes in from the server besides the http response carrying the error. So no packets are leaving the server destined for the the listener client.

What can I do to make this work?
View user's profileFind all posts by probertsSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Everything is okay Smile

You've allowed port 7870
while tried to run with 7869... which is not allowed...

BTW, maybe you will find 3.3 more comfortable with ssh tunneling...
It allows you to override "clienthost" in the debugger settings.
So you may run debug and profiler sessions from inside the IDE.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 15 Jan 2004
Posts: 7
Reply with quote
I had tried this before, but I tried it again just to be sure.

With the configuration unchanged from above, reprinted here for clarity:

Quote:

[debugger]
debugger.enabled = On
debugger.profiler_enabled = On
debugger.hosts_allow = ALL
;debugger.hosts_deny = ALL
debugger.ports = 7870
debugger.fail_silently = Off


I tried the following:

Quote:

http://myserver/example.php?DBGSESSID=1189@clienthost:7870


And received the message:

Quote:

DBG

Failed to start debug session

reason:
connection to the client address NN.NNN.NNN.NNN:7870 is not allowed


Running tcpdump to show packets coming from the server to the clienthost from ports other than 80 shows nothing.

What can I do to make this work?
View user's profileFind all posts by probertsSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
from your previous post I see

Quote:
connection to the client address NN.NNN.NN.NNN:7869 is not allowed


Well, if port is finally okay and you still get rejection, check tcp permissions in /etc/hosts.allow and /etc/hosts.deny
DBG may be added as dbg service.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 24 Oct 2005
Posts: 2
Reply with quote
I am having a similar problem. Can you please post an example line from the hosts.allow file so i can test that as a solution?
View user's profileFind all posts by wardjameSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
connection to the client address NN.NNN.NN.NNN:PPPP is not allowed


If debugger outputs this message, please check php.ini settings listed below

[debugger]
debugger.hosts_allow = NN.NNN.NN.NNN
debugger.ports = PPPP

if you need multiple address values, you may list them all delimited with spaces or commas:
debugger.hosts_allow = NN.NNN.NN.NNN, NN.NNN.NN.KKK, NN.NNN.NN.VVV

if you need a range of ports, you can set it using the syntax like below
debugger.ports = 7869/5, 10000/10
it would allow debugger to access dbglistener on the ports from 7869 up to 7873 (total 5ports) and from 10000 up to 10009 (total 10 ports)

if you need to allow a network instead of particular addresses, you can use either mask or partial address like below

debugger.hosts_allow = 192.168.1.0/24, 192.168.2.

it would allow debugger to connect to dbglistener on 192.168.1.0 network (mask is ff.ff.ff.0 - total 24bits) and on 192.168.2.* addresses.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Failed to start debug session
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