Solved

failed to establish connection

Posted on 2009-04-06
14
783 Views
Last Modified: 2012-05-06
I'm having a firewall exception or a port listening or a router problem... I don't know.

I installed an Apache extension which is a PHP debugger which is DBG, but it can't connect to 127.0.0.1:10001.

My Apache is 2.2.9
My PHP is 5.2.6
My DBG is 2.15.5
My Router is D-Link DI 604

"DBG

Failed to start debug session

reason: failed to establish connection to client host on 127.0.0.1:10001"

What should I do?
0
Comment
Question by:locke1994
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 2
  • 2
14 Comments
 
LVL 11

Expert Comment

by:MacAnthony
ID: 24084028
what is the xdebug.remote_host set to if you look at php info or the php.ini?

If the server and the client are on the same machine, try setting that to localhost.
0
 

Author Comment

by:locke1994
ID: 24084142
xdebug.remote_host is commented out and is set to 127.0.0.1

I tried the following configuration...

debugger.enabled = true
debugger.profiler_enabled = true
debugger.host_allow=127.0.0.1 192.168.0.113
debugger.host_deny=ALL
debugger.JIT_host = localhost
debugger.JIT_port = 10001

...but it did not work.
0
 

Author Comment

by:locke1994
ID: 24084145
debugger.JIT_host was clienthost, I changed it to localhost
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 3

Expert Comment

by:techmaza
ID: 24085145


 Go to following page

http://www.php-debugger.com/dbg/installation.php

on point 3 of Configuring server part:
they have clearly mentioned
that clienthost is a keyword for DBG. If you use it, DBG will automatically detect IP of each client.

Read the page carefully for instruction on copying the bundled dlls from 'dlls' folder to any directory listed in Windows PATH.

I think u may have missed that step

Best Of Luck

0
 

Author Comment

by:locke1994
ID: 24086259
techmaza, reading the instruction on copying the bundled dlls from 'dlls' folder was very helpful!

After installing xampp, there are two php.inis, two extensions folder and one ext folder. I had to edit the php.ini in xampp/apache/bin and copy php_dbg.dll to xampp/php/ext.


Now, there is no "Failed to start debug session" error any .longer, but I set a breakpoint with toggle breakpoint or breakpoint() and it is ignored.

function breakpoint(){
ob_flush();
echo 'test';
flush();
echo 'test';
sleep(.1);
echo 'test';
debugBreak();
echo 'test';
}
breakpoint();

It even echoes four tests...
0
 

Author Comment

by:locke1994
ID: 24086413
There is no error... but there is no sign of any other activity either! What if php_dbg.dll is not loaded? What if DBG is not running?
0
 

Author Comment

by:locke1994
ID: 24086480
Now that it is loading, I am getting "failed to establish connection" again...
0
 

Author Comment

by:locke1994
ID: 24086925
techmaza... I tried everything! clienthost, localhost, 127.0.0.1, :7869, :10001, firewall, router, apache/bin/php.ini, php/php.ini, apache/bin/extensions, php/extensions, php/ext... what now?
0
 

Author Comment

by:locke1994
ID: 24086950
php_dbg.dll was in C:\xampp\php\ext, so I tried adding C:\xampp\php to Windows PATH, but it did not work, then C:\xampp\php\ext to Windows PATH, but it did not work.
0
 
LVL 11

Assisted Solution

by:MacAnthony
MacAnthony earned 200 total points
ID: 24087012
Sorry, I thought this was with xdebug at first.

Are the client and server on the same machine? If they are, that should eliminate the router as an issue and should just be a config problem. You may have to check your windows firewall though. Possibly just temporarily disabling it for testing purposes and if that ends up being the issue, putting an exception for the 10001 port.
0
 

Author Comment

by:locke1994
ID: 24087453
Yes, the client and server are on the same machine. Using the configuration mentioned in the DBG site without Firewall doesn't work.
0
 
LVL 3

Accepted Solution

by:
techmaza earned 300 total points
ID: 24087772

 I m new for debugging by using above software but as far as ur problem is concerned i have got following Link in .nusphere.com forum

http://forum.nusphere.com/viewtopic.php?t=5544&highlight=breakpoint+ignored

http://forum.nusphere.com/search.php?mode=results&sid=073a1583c8eff79200d1fbbda7e98458

May be ur problem will be solved using these
If u do not get the result then post a question on nusphere.com, admin and moderators r very active on that forum u will get ur result easily in few minutes.

Thanku
Best Of Luck
techmaza

0
 

Author Comment

by:locke1994
ID: 24087905
nuSphere is the maker of PHPed, a PHP IDE. I am using eclipse, an other PHP IDE. Will they still help?
0
 

Author Comment

by:locke1994
ID: 24094355
I installed Xdebug!
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the hope of saving someone else's sanity... About a year ago we bought a Cisco 1921 router with two ADSL/VDSL EHWIC cards to load balance local network traffic over the two broadband lines we have, but we couldn't get the routing to work consi…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question