Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » eclipse doesn't get message back from xdebug(during webserver debugging using xdebug )
icon5.gif  eclipse doesn't get message back from xdebug [message #510745] Thu, 28 January 2010 14:31 Go to next message
Ethereal1m Mising name is currently offline Ethereal1m Mising nameFriend
Messages: 37
Registered: January 2010
Member
Dear all,
this problem is still related to http:// www.eclipse.org/forums/index.php?t=msg&th=161476&sta rt=0&

When I'm running xdebug to execute it via webserver, the communication between Eclipse and webserver doesn't establish. I can tell this since Eclipse is just sitting there waiting answer from Webserver/Xdebug to reply. This is shown on the following screenshot:
http://img111.imagevenue.com/loc577/th_86733_xdebug_122_577lo.jpg
The popup dialog says "waiting for xdebug session", I take as Eclipse is waiting for Xdebug

I manage to narrow down the problem that is I know this is not a port problem (as suspected in the last thread) since I can run Xdebug on php executable without problem. I confirm it during its running, I execute netstat and it shows:
 TCP    Serenity:3670          localhost:9000         ESTABLISHED
 TCP    Serenity:9000          localhost:3670         ESTABLISHED

which means that it connects with the localhost (Serenity) whereas during running script on webserver, netstat shows:
 TCP    Serenity:9000          Serenity:0             LISTENING

which means there's no connection established on port 9000.

Since I don't understand communication between Eclipse and Xdebug/Webserver mechanism, I need help. Any ideas?

Best regards,
ethereal1m
Re: eclipse doesn't get message back from xdebug [message #510774 is a reply to message #510745] Thu, 28 January 2010 15:27 Go to previous messageGo to next message
Ethereal1m Mising name is currently offline Ethereal1m Mising nameFriend
Messages: 37
Registered: January 2010
Member
I have additional information,
Apache access log file says:
198.168.1.3 - - [28/Jan/2010:22:22:43 +0700] "GET /train/session/prefs.html?XDEBUG_SESSION_START=ECLIPSE_DBGP&KEY=12646921627506 HTTP/1.1" 200 601

which shows that Apache receives a request from Eclipse but it (with xdbug) doesn't give response back. Note that 198.168.1.3 is my LAN ethernet IP address.

[Updated on: Thu, 28 January 2010 15:28]

Report message to a moderator

Re: eclipse doesn't get message back from xdebug [message #510779 is a reply to message #510745] Thu, 28 January 2010 15:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dkel50.hotremovemail.com

Either xdebug is not loading in your webserver environment or it cannot
establish a connection with the IDE through TCPIP which ties in with not
having anything in the log.

Can you use some of the other xdebug features ok ? for example for
var_dump improvements, or stack trace output ? If these don't work
either then xdebug is just not working in your environment. If that is
the case, you need to go to www.xdebug.org for more help.

Dave Kelsey

On 28/01/10 14:31, Ethereal1m wrote:
> Dear all,
> this problem is still related to
> http://www.eclipse.org/forums/index.php?t=msg&th=161476& amp;start=0&
>
> When I'm running xdebug to execute it via webserver, the communication
> between Eclipse and webserver doesn't establish. I can tell this since
> Eclipse is just sitting there waiting answer from Webserver/Xdebug to
> reply. This is shown on the following screenshot:
> http://img111.imagevenue.com/img.php?image=86733_xdebug_122_ 577lo.jpg
> The popup dialog says "waiting for xdebug session", I take as Eclipse is
> waiting for Xdebug
>
> I manage to narrow down the problem that is I know this is not a port
> problem (as suspected in the last thread) since I can run Xdebug on php
> executable without problem. I confirm it during its running, I execute
> netstat and it shows:
>
> TCP Serenity:3670 localhost:9000 ESTABLISHED
> TCP Serenity:9000 localhost:3670 ESTABLISHED
>
> which means that it connects with the localhost (Serenity) whereas
> during running script on webserver, netstat shows:
>
> TCP Serenity:9000 Serenity:0 LISTENING
>
> which means there's no connection established on port 9000.
>
> Since I don't understand communication between Eclipse and
> Xdebug/Webserver mechanism, I need help. Any ideas?
>
> Best regards,
> ethereal1m
Re: eclipse doesn't get message back from xdebug [message #510780 is a reply to message #510774] Thu, 28 January 2010 15:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dkel50.hotremovemail.com

As one final thought, can you create a simple php script eg test.php and
attempt to debug that from your webserver ?

Dave Kelsey

On 28/01/10 15:27, Ethereal1m wrote:
> I have additional information,
> Apache access log file says:
>
> 98.168.1.3 - - [28/Jan/2010:22:22:43 +0700] "GET
> /train/session/prefs.html?XDEBUG_SESSION_START=ECLIPSE_DBGP& amp;KEY=12646921627506
> HTTP/1.1" 200 601
>
> which shows that Apache receives a request from Eclipse but it (with
> xdbug) doesn't give response back.
Re: eclipse doesn't get message back from xdebug [message #510792 is a reply to message #510780] Thu, 28 January 2010 16:26 Go to previous messageGo to next message
Ethereal1m Mising name is currently offline Ethereal1m Mising nameFriend
Messages: 37
Registered: January 2010
Member
hi Dave,
I really appreciate your fast reply, I've been struggling with this problem for almost a week now....

Anyway the xdebug vardump works in my environment. Suppose I have the following script:
<?php
ini_set('xdebug.var_display_max_children', 1 );
class test {
    public $pub = false;
    private $priv = true;
    protected $prot = 42;
}
$t = new test;
$t->pub = $t;
$data = array(
    'one' => 'a somewhat long string!',
    'two' => array(
        'two.one' => array(
            'two.one.zero' => 210,
            'two.one.one' => array(
                'two.one.one.zero' => 3.141592564,
                'two.one.one.one'  => 2.7,
            ),
        ),
    ),
    'three' => $t,
    'four' => range(0, 5),
);
var_dump( $data );
?>

and the result is:
array
  'one' => string 'a somewhat long string!' (length=23)
  more elements...

So it recieves xdebug function well.

As for your final thought, I've been using a simple script to test xdebug on webserver:
html script:
<html>

<body>

<form action="temp.php" method="post">

Name: <input type="text" name="name" />

Age: <input type="text" name="age" />

<input type="submit" />

</form>

</body>

</html>

its php counterpart:
<html>

<body>

Welcome <?php echo $_POST["name"]; ?>.<br />

You are <?php echo $_POST["age"]; ?> years old.

</body>

</html>

But the xdebug doesn't reply back to Eclipse using that script.

I just want to make sure what do you mean by "create a simple php script eg test.php and attempt to debug that from your webserver" ? Do you mean debug it using xdebug? If that's the case it doesn't work. But my server can run the script directly without any problem.


[Updated on: Thu, 28 January 2010 16:34]

Report message to a moderator

Re: eclipse doesn't get message back from xdebug [message #510796 is a reply to message #510779] Thu, 28 January 2010 16:41 Go to previous messageGo to next message
Ethereal1m Mising name is currently offline Ethereal1m Mising nameFriend
Messages: 37
Registered: January 2010
Member
Eclipse User wrote on Thu, 28 January 2010 10:33
Originally posted by: dkel50.hotremovemail.com

Either xdebug is not loading in your webserver environment or it cannot
establish a connection with the IDE through TCPIP which ties in with not
having anything in the log.


Hmm,
looks like xdebug is loading in my webserver environment since I can do extended xdebug vardump.

Also xdebug can establish connection with IDE only during "debugging a php script using php.exe" mode but it's not the case during debugging a script through a web server.
Re: eclipse doesn't get message back from xdebug [message #510889 is a reply to message #510774] Fri, 29 January 2010 02:02 Go to previous messageGo to next message
Toshihiro Izumi is currently offline Toshihiro IzumiFriend
Messages: 360
Registered: July 2009
Location: Japan
Senior Member
Ethereal1m wrote on Thu, 28 January 2010 10:27
I have additional information,
Apache access log file says:
198.168.1.3 - - [28/Jan/2010:22:22:43 +0700] "GET /train/session/prefs.html?XDEBUG_SESSION_START=ECLIPSE_DBGP&KEY=12646921627506 HTTP/1.1" 200 601

which shows that Apache receives a request from Eclipse but it (with xdbug) doesn't give response back. Note that 198.168.1.3 is my LAN ethernet IP address.


Did you configure httpd.conf to treat html as php?
Re: eclipse doesn't get message back from xdebug [message #510893 is a reply to message #510745] Fri, 29 January 2010 03:21 Go to previous message
Ethereal1m Mising name is currently offline Ethereal1m Mising nameFriend
Messages: 37
Registered: January 2010
Member
You right! wohoooo, I got it! Surprised
AddType application/x-httpd-php .php .html


Oh man,Izumi I really thank you big time! Now I'm assuaged from nightmare... Very Happy

[Updated on: Fri, 29 January 2010 03:23]

Report message to a moderator

Previous Topic:Linkink method of class created by getinstance
Next Topic:Re: debian 4.0 and PDT
Goto Forum:
  


Current Time: Tue May 18 02:52:02 GMT 2021

Powered by FUDForum. Page generated in 0.02329 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top