Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » But this is a debug bug?
But this is a debug bug? [message #46791] Tue, 28 August 2007 06:37 Go to next message
Fabio Z is currently offline Fabio ZFriend
Messages: 46
Registered: July 2009
Member
Try this code in a simple php file:

<?php

echo("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"");
echo("\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">");
echo("<html>");
echo("<head>");
echo("<title>Test page</title>");
echo("<body'>");
echo(" <img name='Image' id='image' src='' />");
echo("</body>");
echo("</html>");

?>

Put a breakpoint on a line and run the debug (XDebug).

The page is loaded and debugged 2(!) times (if you press the F8 you can see
that the debugger stops on the single breakpoint 2 times).

This if the image "src" is empty, if it is valued (also with an invalid
image path) all works well.

Debug bug or what?
We need to post the bug to bugzilla?

Thanks
Re: But this is a debug bug? [message #46915 is a reply to message #46791] Tue, 28 August 2007 10:55 Go to previous messageGo to next message
D Kelsey is currently offline D KelseyFriend
Messages: 232
Registered: July 2009
Senior Member
This is a strange one. It isn't a bug in the XDebug support for PDT as
I can reproduce the problem using the xdebugclient command line tool.
The problem is at the server end but I don't know what is the cause. It
might not be an XDebug problem either. It could be an apache or PHP issue
(there may even be a good reason for this, although I have no idea what that
reason might be).

Dave Kelsey

Fabio wrote:
> Try this code in a simple php file:
>
> <?php
>
> echo("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"");
> echo("\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">");
> echo("<html>");
> echo("<head>");
> echo("<title>Test page</title>");
> echo("<body'>");
> echo(" <img name='Image' id='image' src='' />");
> echo("</body>");
> echo("</html>");
>
> ?>
>
> Put a breakpoint on a line and run the debug (XDebug).
>
> The page is loaded and debugged 2(!) times (if you press the F8 you can see
> that the debugger stops on the single breakpoint 2 times).
>
> This if the image "src" is empty, if it is valued (also with an invalid
> image path) all works well.
>
> Debug bug or what?
> We need to post the bug to bugzilla?
>
> Thanks
>
>
Re: But this is a debug bug? [message #46974 is a reply to message #46915] Tue, 28 August 2007 10:59 Go to previous messageGo to next message
Fabio Z is currently offline Fabio ZFriend
Messages: 46
Registered: July 2009
Member
"Dave Kelsey" <dkel50@hotmail.com> ha scritto nel messaggio
news:fb0uvj$m0a$1@build.eclipse.org...

> It could be an apache or PHP issue

It isn't sure an apache problem: I'm working with winxp+iis

I think that I'll try to post it as a little bug to try if none can say
something :)

Thanks
Re: But this is a debug bug? [message #47032 is a reply to message #46974] Tue, 28 August 2007 11:05 Go to previous messageGo to next message
D Kelsey is currently offline D KelseyFriend
Messages: 232
Registered: July 2009
Senior Member
well that is good to know. So the problem is likely to lie with
XDebug or PHP itself. Another good test would be to see the same
problem occurs with the zend debugger.If it doesn't then it is
most likely being caused by XDebug.

Dave Kelsey

Fabio wrote:
> "Dave Kelsey" <dkel50@hotmail.com> ha scritto nel messaggio
> news:fb0uvj$m0a$1@build.eclipse.org...
>
>> It could be an apache or PHP issue
>
> It isn't sure an apache problem: I'm working with winxp+iis
>
> I think that I'll try to post it as a little bug to try if none can say
> something :)
>
> Thanks
>
>
Re: But this is a debug bug? [message #47180 is a reply to message #47032] Tue, 28 August 2007 11:54 Go to previous messageGo to next message
Fabio Z is currently offline Fabio ZFriend
Messages: 46
Registered: July 2009
Member
"Dave Kelsey" <dkel50@hotmail.com> ha scritto nel messaggio
news:fb0vgv$n15$2@build.eclipse.org...

> well that is good to know. So the problem is likely to lie with
> XDebug or PHP itself. Another good test would be to see the same
> problem occurs with the zend debugger.If it doesn't then it is
> most likely being caused by XDebug.

I don't have the zend debugger nor know how and if I can test it...
Re: But this is a debug bug? [message #47260 is a reply to message #46791] Tue, 28 August 2007 14:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cryogenesis.gmail.com

Are you opening this in a browser?

Maybe the empty src makes the browser think that the image url is the
current page, thus making a second request to the server. A look at the
apache logs might point to this.

Rafael

On 28/8/2007 03:37, Fabio wrote:
> Try this code in a simple php file:
>
> <?php
>
> echo("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"");
> echo("\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">");
> echo("<html>");
> echo("<head>");
> echo("<title>Test page</title>");
> echo("<body'>");
> echo(" <img name='Image' id='image' src='' />");
> echo("</body>");
> echo("</html>");
>
> ?>
>
> Put a breakpoint on a line and run the debug (XDebug).
>
> The page is loaded and debugged 2(!) times (if you press the F8 you can see
> that the debugger stops on the single breakpoint 2 times).
>
> This if the image "src" is empty, if it is valued (also with an invalid
> image path) all works well.
>
> Debug bug or what?
> We need to post the bug to bugzilla?
>
> Thanks
>
>
Re: But this is a debug bug? [message #47278 is a reply to message #47260] Tue, 28 August 2007 14:37 Go to previous messageGo to next message
D Kelsey is currently offline D KelseyFriend
Messages: 232
Registered: July 2009
Senior Member
How about that, I never thought it might be the browser. I tried it under
Internet Explorer 6 and didn't get the problem. So it looks like this is
an issue with FireFox.

Thanks for the pointer.
Dave Kelsey


Phenøm wrote:
> Are you opening this in a browser?
>
> Maybe the empty src makes the browser think that the image url is the
> current page, thus making a second request to the server. A look at the
> apache logs might point to this.
>
> Rafael
>
> On 28/8/2007 03:37, Fabio wrote:
>> Try this code in a simple php file:
>>
>> <?php
>>
>> echo("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"");
>> echo("\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">");
>> echo("<html>");
>> echo("<head>");
>> echo("<title>Test page</title>");
>> echo("<body'>");
>> echo(" <img name='Image' id='image' src='' />");
>> echo("</body>");
>> echo("</html>");
>>
>> ?>
>>
>> Put a breakpoint on a line and run the debug (XDebug).
>>
>> The page is loaded and debugged 2(!) times (if you press the F8 you
>> can see that the debugger stops on the single breakpoint 2 times).
>>
>> This if the image "src" is empty, if it is valued (also with an
>> invalid image path) all works well.
>>
>> Debug bug or what?
>> We need to post the bug to bugzilla?
>>
>> Thanks
>>
Re: But this is a debug bug? [message #47302 is a reply to message #47278] Tue, 28 August 2007 14:45 Go to previous messageGo to next message
Fabio Z is currently offline Fabio ZFriend
Messages: 46
Registered: July 2009
Member
"Dave Kelsey" <dkel50@hotmail.com> ha scritto nel messaggio
news:fb1but$cv5$1@build.eclipse.org...

> How about that, I never thought it might be the browser. I tried it under
> Internet Explorer 6 and didn't get the problem. So it looks like this is
> an issue with FireFox.

Uh!
It seems so!
I use Firefox, and it produce this kind of *useful* bug :)
If I try with IE all goes right.

So is a Firefox bug, not a PDT bug.

Right? :)
Re: But this is a debug bug? [message #47388 is a reply to message #47302] Tue, 28 August 2007 15:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: smserg.bk.ru

Well, AFAIK empty url is url of current page. This bug is not in
firefox, but in html code.

Fabio wrote:
> "Dave Kelsey" <dkel50@hotmail.com> ha scritto nel messaggio
> news:fb1but$cv5$1@build.eclipse.org...
>
>> How about that, I never thought it might be the browser. I tried it under
>> Internet Explorer 6 and didn't get the problem. So it looks like this is
>> an issue with FireFox.
>
> Uh!
> It seems so!
> I use Firefox, and it produce this kind of *useful* bug :)
> If I try with IE all goes right.
>
> So is a Firefox bug, not a PDT bug.
>
> Right? :)
>
>
Re: But this is a debug bug? [message #47447 is a reply to message #47388] Tue, 28 August 2007 16:17 Go to previous messageGo to next message
Fabio Z is currently offline Fabio ZFriend
Messages: 46
Registered: July 2009
Member
"Sergey Smirnov" <smserg@bk.ru> ha scritto nel messaggio
news:46D43F5F.7040008@bk.ru...

> Well, AFAIK empty url is url of current page. This bug is not in firefox,
> but in html code.

yes, the html withouth url has little sense, but firefox do it (and it is
wrong: why reload the page and not just ignore the image?), IE works well:
just ONE page load.
Re: But this is a debug bug? [message #47476 is a reply to message #47447] Tue, 28 August 2007 17:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Martin.eisengardt.de

Reloading an empty URL is undefined even if one is trying to redirect to an
empty url. You might speak of a firefox bug since W3 and RFC 1738/1808/2396
define empty Strings to be invalid.
This "feature" should be posted at firefox group. IE simply defines this to
be illegal and automatically shows a "dead" image bitmap. Javascript covers
an empty URL at IE and the current URL at firefox.

Somehow strange and senseless.
Re: But this is a debug bug? [message #47570 is a reply to message #47476] Wed, 29 August 2007 01:58 Go to previous messageGo to next message
Michael Fesser is currently offline Michael FesserFriend
Messages: 16
Registered: July 2009
Junior Member
..oO(Martin Eisengardt)

>Reloading an empty URL is undefined even if one is trying to redirect to an
>empty url. You might speak of a firefox bug since W3 and RFC 1738/1808/2396
>define empty Strings to be invalid.

Empty URLs are perfectly valid. RFC 2396 states in section 4.2:

| However, if the URI reference occurs in a context that is always
| intended to result in a new request, as in the case of HTML's FORM
| element, then an empty URI reference represents the base URI of the
| current document and should be replaced by that URI when transformed
| into a request.

And obviously not only a form, but also the img's 'src' attribute is
intended to result in a new request to the server.

So while FF's behaviour could be called rather pointless, I don't
consider that a bug actually, since it's RFC-compliant.

Micha
Re: But this is a debug bug? [message #47597 is a reply to message #47570] Wed, 29 August 2007 05:42 Go to previous message
Eclipse UserFriend
Originally posted by: Martin.eisengardt.de

4.2. Same-document References

RFC says:
A URI reference that does not contain a URI is a reference to the
current document. In other words, an empty URI reference within a
document is interpreted as a reference to the start of that document,
and a reference containing only a fragment identifier is a reference
to the identified fragment of that document. Traversal of such a
reference should not result in an additional retrieval action.
However, if the URI reference occurs in a context that is always
intended to result in a new request, as in the case of HTML's FORM
element, then an empty URI reference represents the base URI of the
current document and should be replaced by that URI when transformed
into a request.

OK, made a mistake. But speaking of IMG it is somehow senseless. Now its
some ie bug? :-) It's difficult. Following code should mean the same?
<a href=""> vs. <a> vs. <a href="#">
Because this alters from RFC definition above since it must not result in
any new request (at least the last example should not) but should leed to
page top?

Maybe I am wrong but maybe W3 should define this img behaviour. IMHO this
img behaviour is undefined.
Maybe this newsgroup should not discuss a W3 definition or missing W3
definition ;-)
Previous Topic:I don't understand the debug page address
Next Topic:Editor throws NPE on enabled code folding as it parses a single line of a PHPDoc like comment
Goto Forum:
  


Current Time: Fri Dec 27 02:20:06 GMT 2024

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

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

Back to the top