NuSphere Corporation
Support Services
Overview
KB
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
Technical FAQ
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla Development
Learn PHP
<Troubleshooting php debugger communicationsFailed to connect to the client address>
Last updated: Sun, 28 Mar 2010

Troubleshooting connectivity with remote debugger established through SSH tunnel

If you're using ssh tunnel to connect remote debugger with the IDE, but something goes wrong and debugger does not start, follow the instructions below. If you don't use ssh tunnel, please switch to these instructions
  • Make sure that ssh tunnel is running on the client machine. For example, if you are using cygwin SSH client, you can open SSH tunnel with the following command:
    ssh -R localhost:7869:localhost:7869 serveraccount@serverhost
    where serveraccount is your user account on the server and serverhost is a host name of the server or its IP address. This command will open ssh tunnel and provide a way for the debugger to connect to the IDE when you start debug session later on
    NOTE: this command should be executed on PhpED's computer and not on the server
    NOTE: you'd start ssh client and keep it running each time you want to debug through ssh
    NOTE: If you need an ssh client and/or server (daemon) for Windows OS, please take a look at Cygwin freeware product
    NOTE: If you're using Putty ssh client, don't forget that debugger requires REMOTE (REVERSE) tunnel. LOCAL (DIRECT) tunnels won't work in our case
  • Run NuSphere PhpED
  • Open Tools -> Settings -> Run & Debug page
  • Make sure that "use custom port and host" checkbox is checked. Enter localhost into host name input and set 7869 port here
  • Create a project in the Workspace window if you haven't already created one. Open Project Properties dialog and press Settings Wizard button.
  • Proceed with Project Wizard pages
  • If it says the debugger is not installed, please proceed with these instructions and install the debugger
  • If the problem is "debugger is not allowed to connect to the client machine", you have to update debugger.hosts_allow debugger setting in php.ini. It's what allows or disallows the debugger to connect to the client machine. In order to allow the connection with ssh tunnel, the line should contain:
    debugger.hosts_allow=localhost 127.0.0.1
  • If the communication between remote debugger and IDE is not established (timeout), please make sure the firewals on the server and client are properly configured and firewall on the server allows debugger module on the server to connect to the server's port 7869, and firewall on the client machine allows ssh client to connect to dbglistener.exe at 7869 port. Also make sure that ssh tunnel has opened listening socket on the server's 7869 port and it is bound to localhost (127.0.0.1 and/or ::1). In order to check this, please open console on the server and run
    netstat -na|grep tcp|grep -F ":7869"|grep LISTEN
    NOTE: some systems may require different arguments for netstat. With -na we want to see listening and regular sockets and their ports and addresses in numeric form, grep filters the output and selects only the line with tcp, :7689, and LISTENING
    If this command does not return anything, please consult with your server administrator.
  • As soon as the Wizard succeeded with its checks, connect to your server and create a simple script like below:
    <?php
      echo "hello world";
    ?>
  • Make sure it works in your browser, then open this file in the IDE using project's publishing account and press F7 (Step). At this moment the debugger should start
  • In case of any problems, don't hesitate to contact NuSphere Support using Contact us form



<Troubleshooting php debugger communicationsFailed to connect to the client address>
Last updated: Sun, 28 Mar 2010