You Sunk My Session Variable!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Hodge
Forum Newbie
Posts: 6
Joined: Wed Dec 08, 2010 1:17 pm

You Sunk My Session Variable!

Post by Hodge »

Hi Everyone. Ive written quite a few java apps but am trying to cut my teeth on PHP.
I am using the PDT plugin for Eclipse and what seems to be happening is when i launch my page, test it, close it and reopen, my session is still active and my session variables are not resetting the way I expect. The only way I seem to be able to "reset" is to make an erroneous change to the code and re-save it. I'm tired of doing it so I am just going to link a button to a session close command.
Either way its pita and I figure there has got to be a better way.
Also, is the PDT it for eclipse and PHP? The syntax works ok but its not near as comprehensive as when writing Java code.

Thanks for any help!


:)


*edit To clarify, I am launching the page from withing Eclipse using the Eclipse browser.
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: You Sunk My Session Variable!

Post by Jonah Bron »

The session is kept as long as the browser keeps the cookie and the server doesn't expire it; which ever comes first. Eclipse probably isn't deleting the cookie. Try it in your browser.
Hodge
Forum Newbie
Posts: 6
Joined: Wed Dec 08, 2010 1:17 pm

Re: You Sunk My Session Variable!

Post by Hodge »

Thanks Jonah; I guess Eclipse taps Firefox to use as its browser. So since I have FF open doing other things, the session stays open until I close all instances of FF. I guess I'll have to use Chrome or something while working with Eclipse If I want to avoid this.

btw, is there a better/more inclusive syntax debugger that can plug in to eclips than just the PDT?
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: You Sunk My Session Variable!

Post by Jonah Bron »

I don't know, I use PDT myself. There are others though... check out this thread:

viewtopic.php?f=6&t=81100
Post Reply