Solved

failed to establish connection

Posted on 2009-04-06
14
747 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
  • 10
  • 2
  • 2
14 Comments
 
LVL 11

Expert Comment

by:MacAnthony
Comment Utility
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
Comment Utility
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
Comment Utility
debugger.JIT_host was clienthost, I changed it to localhost
0
 
LVL 3

Expert Comment

by:techmaza
Comment Utility


 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
Comment Utility
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
Comment Utility
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
Comment Utility
Now that it is loading, I am getting "failed to establish connection" again...
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Comment

by:locke1994
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility

 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
Comment Utility
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
Comment Utility
I installed Xdebug!
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

The Cisco RV042 router is a popular small network interfacing device that is often used as an internet gateway. Network administrators need to get at the management interface to make settings, change passwords, etc. This access is generally done usi…
In the world of WAN, QoS is a pretty important topic for most, if not all, networks. Some WAN technologies have QoS mechanisms built in, but others, such as some L2 WAN's, don't have QoS control in the provider cloud.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

763 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now