NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Debugging a remote SOAP Server with PHPEd


Joined: 03 Dec 2006
Posts: 8
Reply with quote
I can't seem to figure out how to do this. I want to debug a SOAP server (nusoap) running on a remote web server. I can start a debug session from PHPEd (V5) to that server using SSH tunnelling, but if I add a DebugBreak(1) to a SOAP function, the client receives a connection error.

Is there a trick to doing this?
View user's profileFind all posts by drosen001Send private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
try DebugBreak('1@ip_address_to_connect_to')
where ip_address_to_connect_to is the IP address where debugger should connect to.
If you use SSH tunneling you need to specify address of the tunnel listening point.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 03 Dec 2006
Posts: 8
Reply with quote
Thanks for the reply. Do you mean something like this?

DebugBreak( 1@localhost:7869 );

If so that doesn't seem to work or I'm starting it properly. Using SSH tunneling, the debugging the client works just fine. When I put the above line in the SOAP server code, inside a registered function, the client complains about connection errors. Even though it shouldn't matter, we are also using basic authentication on the server to insure that requests are coming from an approved client.
View user's profileFind all posts by drosen001Send private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
Quote:
Do you mean something like this?

DebugBreak( 1@localhost:7869 );

not exactly, but very close. You have to quote the line, like there DebugBreak('1@localhost:7869')
and you don't have to specify port if it is 7869 (the default value).

Quote:
the client complains about connection errors

check that ssh tunnel is running and make sure that TCP/127.0.0.1:7869 is in listening state on the server.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 03 Dec 2006
Posts: 8
Reply with quote
Thanks, but still no luck. I start the client, which in this case is one the same server, in debug using F9. The debugger starts fine, so the SSH tunnel is working OK.

However, the client still gets a SOAP communication error with the server and the debugger doesn't pop up on the debugbreak( '1:localhost' ) statement.

I have the debugbreak inside a particular SOAP server function, but also tried it at the start of the soap server, with the same results.

require_once(NUSOAP);
DebugBreak( '1@localhost' );
$myServer = new soap_server;
View user's profileFind all posts by drosen001Send private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
debugbreak( '1:localhost' ) <- this is not correct.

and please do not try to start another debug session while IDE is in debug mode. It won't work. You need to start your client without debugger to have server debugged.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 03 Dec 2006
Posts: 8
Reply with quote
Sorry, mistyped the message, its been DebugBreak( '1@localhost');

Here's more info. If I start the SOAP server directly in PhpED with Ctrl+F9, execution stops at the debug break. If I run the server from the browser I get the following message:

DBG 3.1.8
Failed to run DBG session
Reason: failed to connect to the client address 69.xxx.yy.251:7869
Not sure what it means? Visit http://www.nusphere.com/dbg/ for troubleshooting.


Debugger request: "1@localhost"
Request found in: "DebugBreak(arg)"
Target PHP version: "4.4.2"
Server API: "Apache"
Extensions API: "20050606"
Modules API: "20020429"
PHP API: "20020918"
View user's profileFind all posts by drosen001Send private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
please check if 69.xxx.yy.251 is set in php.ini and if you find it there, just comment out.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 03 Dec 2006
Posts: 8
Reply with quote
There is no such IP in the /usr/local/lib/php.ini or /usr/lib/php.ini. Here's the debugger section in both files.

[Debugger]
debugger.host = localhost
debugger.port = 7869
debugger.enabled = true


Last edited by drosen001 on Tue Jun 19, 2007 9:03 am; edited 1 time in total
View user's profileFind all posts by drosen001Send private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
btw, I just noticed dbg-3.1.8 in your post. Please update to 3.1.12 that comes with the most recent version of phped.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 03 Dec 2006
Posts: 8
Reply with quote
I don't think I have 3.1.12. This is the file that comes with phped V5.

dbg-3.1.11-Linux.tar.gz

Is there a later version?
View user's profileFind all posts by drosen001Send private message
Debugging a remote SOAP Server with PHPEd
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