Solved

failed to establish connection

Posted on 2009-04-06
14
779 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
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
Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

 
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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Custom Wordpress Loop 22 38
PHP breaks when used in Wordpress template file 3 30
Log in through ID 5 17
MSSQL - Lock Row from reading by other programs 9 35
Getting hacked is no longer a matter or "if you get hacked" — the 2016 cyber threat landscape is now titled "when you get hacked." When it happens — will you be proactive, or reactive?
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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.

839 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