NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
APACHE&PHP and PhpED on the same PC, but browser on anot


Joined: 08 Sep 2011
Posts: 4
Reply with quote
Hi, I'm trying to figure out how to debug my script on developer's machine, when the script were called from remote PC.

I.e. I have a developer PC with apache, php and phped installed.
I created test script:

<?

DebugBreak();

?>

When I open firefox on the same PC and go to MY_PC_IP_ADDRESS/script.php url - all works well and phped stops on DebugBreak().
But when I'm trying to open the same script from remote PC (from my notebook really) i got the following error:

See url: ybex.com/d/vzheo8iq5ro98nun7emvfkciyhhal2hewq6ygtht.html


Can anyone help me? It seems that dbg module tries to connect phped on my notebook's IP, instead of connecting to 127.0.0.1. Is there any what to specify the client ip manually? Thanks.
View user's profileFind all posts by aklabsSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
if you run through web server (using your browser), it knows the IP address the request was sent from and debugger uses this IP to connect to the IDE.
With commandline, you have to tell the IP address to use explicitly.

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


Joined: 08 Sep 2011
Posts: 4
Reply with quote
dmitri wrote:
if you run through web server (using your browser), it knows the IP address the request was sent from and debugger uses this IP to connect to the IDE.


Yes, and that's a problem. It seems that debugger tries to connect IDE using the requiest IP. But I have IDE right on the server(as it's a developer PC as well), so it should connect to localhost instead!

My example: some service calls my script, but it works wrong, so I want to debug it. I can ask the service to send a test request to my script, while I'm looking into IDE right on my server.


Quote:
With commandline, you have to tell the IP address to use explicitly.


Where to tell the IDE ip address manually?


Last edited by aklabs on Thu Sep 08, 2011 5:23 am; edited 2 times in total
View user's profileFind all posts by aklabsSend private message


Joined: 08 Sep 2011
Posts: 1
Reply with quote
In case you call your script from a different client, just attach the DBGSESSID Param like that:

index.php?DBGSESSID=1@10.10.10.10:7869;d=1

where index.php is your script you'd like to debug, 1 is the ID for the debug session, 10.10.10.10 is your IDE's host and 7869 the debug listener's port
View user's profileFind all posts by soboeSend private message


Joined: 08 Sep 2011
Posts: 4
Reply with quote
soboe wrote:
In case you call your script from a different client, just attach the DBGSESSID Param like that:

index.php?DBGSESSID=1@10.10.10.10:7869;d=1

where index.php is your script you'd like to debug, 1 is the ID for the debug session, 10.10.10.10 is your IDE's host and 7869 the debug listener's port



GET parameters is a problem, I'm unable to add them when sending a test request. Is there any way to tell dbg library to use 127.0.0.1 as IDE host EVERYTIME?
View user's profileFind all posts by aklabsSend private message


Joined: 08 Sep 2011
Posts: 4
Reply with quote
soboe wrote:
In case you call your script from a different client, just attach the DBGSESSID Param like that:

index.php?DBGSESSID=1@10.10.10.10:7869;d=1

where index.php is your script you'd like to debug, 1 is the ID for the debug session, 10.10.10.10 is your IDE's host and 7869 the debug listener's port


Btw, I found a way to add GET parameters to my test request and it works well! Thanks. But I still be happy if someone give me better solution. Thanks again.
View user's profileFind all posts by aklabsSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
a better solution? please read FAQ first - it explains all possible ways. Get is by far not the only way.
http://www.nusphere.com/kb/technicalfaq/

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
APACHE&PHP and PhpED on the same PC, but browser on anot
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