Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » PDT/Xdebug strange behavior - can't resolve it
PDT/Xdebug strange behavior - can't resolve it [message #71658] Fri, 23 May 2008 02:04 Go to next message
Eclipse UserFriend
Originally posted by: alan.catterson.comcast.net

Hello. I've been trying to resolve this for 2 days. Decided I need some help
.... :-)

O/S: XP
PHP: 5.2.6
Debug Build => no
Thread Safety => Enabled
Apache: 2.0.58
Xdebug: 2.0.3
Eclipse: 3.3.0
Build id => I20070625-1500
Eclipse PDT: 1.0.2

PHP.INI excerpt:
[Xdebug]
xdebug.remote_enable=1
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
xdebug.remote_log="C:\Program Files\Apache Group\Apache2\logs\Xdebug.log"
zend_extension_ts=C:\php\ext\php_xdebug-2.0.3-5.2.5.dll"

PROBLEM:

I have a very small PHP app that I'm using to learn PHP. The 2 files are
shown below:

new_player_start_form.html:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Player Entry Form</title>
</head>
<body>
<form id="entry" action="new_player.php"
method="POST">
<p><strong>First Name: </strong> <input type="text" name="firstName" /></p>
<p><strong>Last Name: </strong> <input type="text" name="lastName" /></p>
<input type="submit" value="Save" /></form>
</body>
</html>

new_player.php:

<?php
if (isset($_POST["firstName"])&& isset($_POST["lastName"])) {
require_once(dirname(__FILE__)."/db.php");
$firstName = mysqli_escape_string($conn, $_POST["firstName"]);
$lastName = mysqli_escape_string($conn, $_POST["lastName"]);
$fullName = "$firstName $lastName";
$sql = "insert into Players(First_Name, Last_Name) values
('$firstName','$lastName')";
mysqli_query($conn, $sql);
$id = mysqli_insert_id($conn);
echo "Insert successful for $fullName new ID=$id";
} else {
echo "Please fill in both First and Last names";
}
?>
In eclipse PHP perspective:
-Right click on new_player_start_form.html =>Debug As=>Open Debug Dialog
Debug Dialog Info:
Server debugger: Xdebug
PHP Server: Default PHP Web Server
-Click "Debug"

Here's where it gets strange:
- External browser (IE7) pops up (same thing happens w/ eclipse internal
browser)
- Web page "connecting ..."
- URL:
http://localhost/new_player_start_form.html?XDEBUG_SESSION_S TART=ECLIPSE_DBGP&KEY=12115074127964
- It just hangs there ... forever
- PHP Debug perspective:
- Right Click on "Remote Launch"
- Select "Terminate All"
- After a few seconds, the HTML form I was expecting shows up in browser
- THEN ... 2 MORE external IE7 browsers open
- Both browsers display "DEBUG SESSION ENDED"
- URLs in both browsers are the same (shown below)
http://localhost/new_player_start_form.html?
XDEBUG_SESSION_STOP_NO_EXEC=ECLIPSE_DBGP&KEY=12115074127 964
http://localhost/new_player_start_form.html?XDEBUG_SESSION_S TOP_NO_EXEC=ECLIPSE_DBGP&KEY=12115074127964

Xdebug Log File:
Log opened at 2008-05-23 01:50:40
-> <init xmlns="urn:debugger_protocol_v1"
xmlns:xdebug="http://xdebug.org/dbgp/xdebug"
fileuri="file:///C:/workspace/learn/new_player_start_form.html"
language="PHP" protocol_version="1.0" appid="3820"
idekey="ECLIPSE_DBGP"><engine
version="2.0.3"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick
Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright
(c) 2002-2008 by Derick Rethans]]></copyright></init>

<- feature_set -i 22 -n show_hidden -v 1
-> <response xmlns="urn:debugger_protocol_v1"
xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set"
transaction_id="22" feature="show_hidden" success="1"></response>

<- feature_set -i 23 -n max_depth -v 3
-> <response xmlns="urn:debugger_protocol_v1"
xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set"
transaction_id="23" feature="max_depth" success="1"></response>

<- feature_get -i 24 -n max_children
-> <response xmlns="urn:debugger_protocol_v1"
xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_get"
transaction_id="24" feature_name="max_children"
supported="1"><![CDATA[32]]></response>

<- feature_get -i 25 -n encoding
-> <response xmlns="urn:debugger_protocol_v1"
xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_get"
transaction_id="25" feature_name="encoding"
supported="1"><![CDATA[iso-8859-1]]></response>

<- feature_get -i 26 -n supports_async
-> <response xmlns="urn:debugger_protocol_v1"
xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_get"
transaction_id="26" feature_name="supports_async"
supported="1"><![CDATA[0]]></response>

<- breakpoint_set -i 27 -t line -f
file:///C:%5Cworkspace%5Clearn%5Cnew_player.php -n 4
-> <response xmlns="urn:debugger_protocol_v1"
xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set"
transaction_id="27" id="38200001"></response>

<- run -i 28
-> <response xmlns="urn:debugger_protocol_v1"
xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run"
transaction_id="28" status="stopping" reason="ok"></response>

Log closed at 2008-05-23 01:53:30

So ... I've googled for 2 days, and I have only found 1 "kind of" reference
to the problem. It suggested upgrading to latest PDT. Did it. Same behavior.
:-(

If anyone has any info that could help me here ... I'd greatly appreciate
it. If its something stupid in the PHP/HTML code ... note that I'm a
beginner :-) Nevertheless ... its a dinky app that works fine outside the
debugger.

Best regards,
Alan
Re: PDT/Xdebug strange behavior - can't resolve it [message #71677 is a reply to message #71658] Fri, 23 May 2008 02:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: user.domain.invalid

> Here's where it gets strange:
> - External browser (IE7) pops up (same thing happens w/ eclipse internal
> browser)
> - Web page "connecting ..."
> - URL:
> http://localhost/new_player_start_form.html?XDEBUG_SESSION_S TART=ECLIPSE_DBGP&KEY=12115074127964
> - It just hangs there ... forever

Known issue - you are using XDebug v2.0.3 which isn't supported by PDT 1.0. You
must use XDebug 2.0.2.

(BTW: a few weeks ago when I hit this problem, it took me more than 2 days to
figure this one out myself ;-)
Re: PDT/Xdebug strange behavior - can't resolve it [message #71753 is a reply to message #71677] Fri, 23 May 2008 09:39 Go to previous messageGo to next message
D Kelsey is currently offline D KelseyFriend
Messages: 232
Registered: July 2009
Senior Member
You should be able to get xdebug 2.0.2 from the following link
http://www.xdebug.org/link.php?url=xdebug202-52-win

Dave Kelsey

user@domain.invalid wrote:
>> Here's where it gets strange:
>> - External browser (IE7) pops up (same thing happens w/ eclipse
>> internal browser)
>> - Web page "connecting ..."
>> - URL:
>> http://localhost/new_player_start_form.html?XDEBUG_SESSION_S TART=ECLIPSE_DBGP&KEY=12115074127964
>>
>> - It just hangs there ... forever
>
> Known issue - you are using XDebug v2.0.3 which isn't supported by PDT
> 1.0. You must use XDebug 2.0.2.
>
> (BTW: a few weeks ago when I hit this problem, it took me more than 2
> days to figure this one out myself ;-)
Re: PDT/Xdebug strange behavior - can't resolve it [message #72254 is a reply to message #71677] Sun, 01 June 2008 22:59 Go to previous messageGo to next message
Thierry Bothorel is currently offline Thierry BothorelFriend
Messages: 3
Registered: July 2009
Junior Member
user@domain.invalid a écrit :
>> Here's where it gets strange:
>> - External browser (IE7) pops up (same thing happens w/ eclipse
>> internal browser)
>> - Web page "connecting ..."
>> - URL:
>> http://localhost/new_player_start_form.html?XDEBUG_SESSION_S TART=ECLIPSE_DBGP&KEY=12115074127964
>>
>> - It just hangs there ... forever
>
> Known issue - you are using XDebug v2.0.3 which isn't supported by PDT
> 1.0. You must use XDebug 2.0.2.
>
> (BTW: a few weeks ago when I hit this problem, it took me more than 2
> days to figure this one out myself ;-)

What is the issue exactly with 2.0.3. I use it with PDT 1.0 M2 and did
not seen someting wrong (I use internal browser) ?
Re: PDT/Xdebug strange behavior - can't resolve it [message #72286 is a reply to message #72254] Mon, 02 June 2008 09:44 Go to previous messageGo to next message
D Kelsey is currently offline D KelseyFriend
Messages: 232
Registered: July 2009
Senior Member
The problem is that xdebug 2.0.3 changed its termination protocol, which PDT isn't expecting
so doesn't know how to handle it. Effectively that debug session in PDT never terminates, nor does
the php script.

I am not sure what version PDT 1.0 M2 is, I am a little surprised that it works with xdebug 2.0.3.

Dave Kelsey


Thierry Bothorel wrote:
> user@domain.invalid a écrit :
>>> Here's where it gets strange:
>>> - External browser (IE7) pops up (same thing happens w/ eclipse
>>> internal browser)
>>> - Web page "connecting ..."
>>> - URL:
>>> http://localhost/new_player_start_form.html?XDEBUG_SESSION_S TART=ECLIPSE_DBGP&KEY=12115074127964
>>>
>>> - It just hangs there ... forever
>>
>> Known issue - you are using XDebug v2.0.3 which isn't supported by PDT
>> 1.0. You must use XDebug 2.0.2.
>>
>> (BTW: a few weeks ago when I hit this problem, it took me more than 2
>> days to figure this one out myself ;-)
>
> What is the issue exactly with 2.0.3. I use it with PDT 1.0 M2 and did
> not seen someting wrong (I use internal browser) ?
Re: PDT/Xdebug strange behavior - can't resolve it [message #73009 is a reply to message #71658] Wed, 11 June 2008 22:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wjgray.gmail.com

I am getting the same behavior. Did you get any
tips/tricks/hints/resolutions?
Re: PDT/Xdebug strange behavior - can't resolve it [message #73027 is a reply to message #73009] Thu, 12 June 2008 05:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: niederlag.niekom.de

Hello,

Bill Gray schrieb:
> I am getting the same behavior. Did you get any
> tips/tricks/hints/resolutions?

please read the thread.

PDT below 1.0.3 (which was just released yesterday) is not working with
xdebug 2.0.3.

Solution ist either update PDT to 1.0.3 or downgrade xdebug to 2.0.2.

Other than that: Describe your problem and setup *precisly*.

Cheers,
Peter
Re: PDT/Xdebug strange behavior - can't resolve it [message #73045 is a reply to message #73027] Thu, 12 June 2008 10:58 Go to previous message
Eclipse UserFriend
Originally posted by: rob.robsnotebook.com

I have found that PDT 1.0.3 is working with XDebug 2.0.3, but your message
states that it doesn't work with PDT 1.0.3 (but then you say to update to
PDT 1.0.3).

Can you clarify?
Previous Topic:PDT and XDebug 2.0.3
Next Topic:Using "Default system browser" doesn't work
Goto Forum:
  


Current Time: Sat Feb 04 03:54:08 GMT 2023

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

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

Back to the top