[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

failed to establish connection

Posted on 2009-04-06
14
Medium Priority
?
810 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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 800 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 1200 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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 …

831 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