NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
[resolved] debugging public web server without ssh


Joined: 02 Aug 2007
Posts: 23
Reply with quote
Is there a way to do remote debugging with a public web server that is on the same network as the computer that PhpED is installed on without using ssh? I tried just adding the IP address of the computer that has PhpEd installed on it and it to the debugger.hosts_allow= section of the php.ini, but I get the error message:

connection to the client address 192.168.1.1:7869 is not allowed

Well I should not need to add this to the allow list because this is the router address, but I tried it anyway and when I tried debugging, it would sit there trying for a while, and then there would be a timeout error. Please help. I need to get this resolved quickly.
View user's profileFind all posts by INTPnerdSend private message


Joined: 02 Aug 2007
Posts: 23
Reply with quote
I also tried running telnet from the server to the IP of the machine with PhpED installed and the debug listener showed that a connection was established, stayed that way for a second or 2, then the connection was terminated
View user's profileFind all posts by INTPnerdSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
if your server and workstation are on the same network, they should see each other directly. Open phpinfo() page using browser, find REMOTE_ADDR and check if this IP is listed in "ipconfig /all" ouput on your workstation. If it is, you'll be all set if you add debugger.hosts_allow=THATIP. Also you'll need to add 7869 to the allowed ports (debugger.ports).

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


Joined: 02 Aug 2007
Posts: 23
Reply with quote
The IP that it shows for the REMOTE_ADDR is the local IP of our router. I have already tried adding that IP address to be allowed in the php.ini settings. Both the workstation and the server have that IP as the defualt gateway and DNS server in their IP settings. Please help me.
View user's profileFind all posts by INTPnerdSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Quote:
The IP that it shows for the REMOTE_ADDR is the local IP of our router

either your server is in another network or you are working with it through a kind of proxy that runs on the same machine with router.
In first case you need to add NAT router rule to forward incoming connections on TCP/7869 port to your local machine IP TCP/7869. (Check router manual for PORT FORWARDING terms)
In case of proxy, just add an exclusion in the browser settings and try to work directly.

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


Joined: 02 Aug 2007
Posts: 23
Reply with quote
The workstation and server are on the same network. They are even both directly plugged into the same switch. I don't know what a proxy is, but I don't think we are using one. What is a proxy and how can I tell if we are using one?
View user's profileFind all posts by INTPnerdSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
if two hosts are in the same network they can communicate to each other without routing/address translation and REMOTE_ADDR in the phpinfo() would be your workstation's, not the router's.
What are the server and workstation addresses in your network and what is the network mask?

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


Joined: 02 Aug 2007
Posts: 23
Reply with quote
Workstation:
IP: 192.168.1.50
Subnet Mask: 255.255.255.0

Server:
IP: 192.168.1.55
Subnet Mask: 255.255.255.0
View user's profileFind all posts by INTPnerdSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
When you access your server, do you use something like http://192.168.1.55/ or http://somehostname/ ?
In latter case, please try to ping somehostname to see if it matches 192.168.1.55
If not, you're working with your server through public network you're connected to through your router running on 192.168.1.1 and that's why it's shown in the REMOTE_ADDRESS field.
I'd suggest you to try two ways:
-ask your network administrator to update your local network DNS server to have it resolving your server host name as 192.168.1.55
-update your c:\windows\system32\drivers\etc\hosts file with line below
192.168.1.55 servername
where servername is real server name you use in the URLs.

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


Joined: 02 Aug 2007
Posts: 23
Reply with quote
I am using the http://somehostname/ format to access the server. I tried pinging the hostname and it was not pinging the local IP address of that computer. So, I edited the hosts file on my workstation and tried pinging it again. Now it is actually pinging the local IP of the server. I tried the debugger and I still get a timeout error. I checked my phpinfo() information again and the REMOTE_ADDRESS still shows 192.168.1.1, the IP of the router.
View user's profileFind all posts by INTPnerdSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Please check your browser settings to see if PROXY is used. In case of IE you'd check tools->internet options->connections->lan settings->proxy server->advantage

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


Joined: 02 Aug 2007
Posts: 23
Reply with quote
According to your instruction, it does not show any proxy settings being used. I tried changing my project settings to use the IP address of the server instead of the URL, and then debugging worked that way. I tried typing that IP address my web browser, and I went to the phpinfo() page, and then it showed the REMOTE_ADDRESS as being the IP of the workstation I am on. When I ping the url of the server it still says that I am pinging the actual IP of the server computer. Is there any good reason to use the URL instead of the IP address to access the site for development and debugging? As of right now, it is working great with the settings like this.
View user's profileFind all posts by INTPnerdSend private message
[resolved] debugging public web server without ssh
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 2  

  
  
 Reply to topic