Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » I don't understand the debug page address
I don't understand the debug page address [message #46701] Mon, 27 August 2007 22:45 Go to next message
Fabio Z is currently offline Fabio ZFriend
Messages: 46
Registered: July 2009
Member
but why when I debug a page I get anddress on the browser like

http://localhost/webtest.php?XDEBUG_SESSION_START=ECLIPSE_DB GP&KEY=11882540471401

since the same (and clear/correct) address works if it is simple

http://localhost/webtest.php

?
Re: I don't understand the debug page address [message #46885 is a reply to message #46701] Tue, 28 August 2007 10:29 Go to previous messageGo to next message
D Kelsey is currently offline D KelseyFriend
Messages: 232
Registered: July 2009
Senior Member
This is the way Xdebug works. In order for XDebug to know if a script is being debugged
it looks for the cookie XDEBUG_SESSION being set. If it is then it will debug
a script. By placing the XDEBUG_SESSION_START onto the url, tells xdebug to emit the
XDEBUG_SESSION cookie to your browser.

The KEY entry is to handle the situation where the eclipse internal web browser would
cache the page and just reshow the same page unless the url was different.

Dave Kelsey

Fabio wrote:
> but why when I debug a page I get anddress on the browser like
>
> http://localhost/webtest.php?XDEBUG_SESSION_START=ECLIPSE_DB GP&KEY=11882540471401
>
> since the same (and clear/correct) address works if it is simple
>
> http://localhost/webtest.php
>
> ?
>
>
Re: I don't understand the debug page address [message #47417 is a reply to message #46885] Tue, 28 August 2007 16:13 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:fb0ten$i10$1@build.eclipse.org...
> This is the way Xdebug works. In order for XDebug to know if a script is
> being debugged
> it looks for the cookie XDEBUG_SESSION being set. If it is then it will
> debug
> a script. By placing the XDEBUG_SESSION_START onto the url, tells xdebug
> to emit the
> XDEBUG_SESSION cookie to your browser.
>
> The KEY entry is to handle the situation where the eclipse internal web
> browser would
> cache the page and just reshow the same page unless the url was different.

but in this way I get that the $_SESSION["REQUEST_METHOD"] is GET (also if
the form use a POST method) and the page is the first time load, that means
that $_SESSION["REQUEST_METHOD"] should not be GET nor POST.

I cannot know if the page is a "first" navigation or a "submit" request :(

In the first navigation I'd like to do some operations and others of them
only in the submitted time, but I cannot know the difference!

Or there is some way?

Thanks
Re: I don't understand the debug page address [message #47506 is a reply to message #47417] Tue, 28 August 2007 17:32 Go to previous messageGo to next message
Emil Ivanov is currently offline Emil IvanovFriend
Messages: 12
Registered: July 2009
Junior Member
Actually you can know - by setting the *name=* attribute of the button
will cause the it's *value=* to be sent to the server.
Then you can check
if (isset($_POST['Submit'])) {
// It's a post using this button
} else {
// assuming it's first load
}

Regards,
Emil Ivanov

Fabio wrote:
> "Dave Kelsey" <dkel50@hotmail.com> ha scritto nel messaggio
> news:fb0ten$i10$1@build.eclipse.org...
>> This is the way Xdebug works. In order for XDebug to know if a script is
>> being debugged
>> it looks for the cookie XDEBUG_SESSION being set. If it is then it will
>> debug
>> a script. By placing the XDEBUG_SESSION_START onto the url, tells xdebug
>> to emit the
>> XDEBUG_SESSION cookie to your browser.
>>
>> The KEY entry is to handle the situation where the eclipse internal web
>> browser would
>> cache the page and just reshow the same page unless the url was different.
>
> but in this way I get that the $_SESSION["REQUEST_METHOD"] is GET (also if
> the form use a POST method) and the page is the first time load, that means
> that $_SESSION["REQUEST_METHOD"] should not be GET nor POST.
>
> I cannot know if the page is a "first" navigation or a "submit" request :(
>
> In the first navigation I'd like to do some operations and others of them
> only in the submitted time, but I cannot know the difference!
>
> Or there is some way?
>
> Thanks
>
>
Re: I don't understand the debug page address [message #47536 is a reply to message #47506] Tue, 28 August 2007 19:17 Go to previous message
Fabio Z is currently offline Fabio ZFriend
Messages: 46
Registered: July 2009
Member
"emo" <emil.vladev@gmail.com> ha scritto nel messaggio
news:46D45C4A.5020509@gmail.com...

> Actually you can know - by setting the *name=* attribute of the button
> will cause the it's *value=* to be sent to the server.
> Then you can check
> if (isset($_POST['Submit'])) {
> // It's a post using this button
> } else {
> // assuming it's first load
> }

-- errata corrige: I talked about $_SESSION["REQUEST_METHOD"] but it is
$_SERVER["REQUEST_METHOD"] --

Yes, you told me a solution, but:
- this require the fact that I'm working with POST and not with GET, and
this is not sure.
- the first load told me that there is a GET, but it's false.
Previous Topic:Next Integration Build
Next Topic:But this is a debug bug?
Goto Forum:
  


Current Time: Wed Jan 15 11:53:40 GMT 2025

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

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

Back to the top