Jump to content


Photo

Sessions and include()


  • Please log in to reply
2 replies to this topic

#1 Neo55378008

Neo55378008
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 11 August 2006 - 11:04 PM

I'm running in to a weird problem with my code. I have a site that uses sessions, and I can create and destroy sessions pefectly fine. However, if I use the include() function anywhere in my code, when I try to destroy the session, I get an error:
Warning: session_destroy(): Trying to destroy uninitialized session
If I remove the include(), this error goes away. Is there something special you have to do with includes when using sessions? I have start_session() in the included file, I tried removing that line, but it made no difference.

#2 akitchin

akitchin
  • Staff Alumni
  • Advanced Member
  • 2,516 posts
  • LocationCalgary, AB, Canada

Posted 11 August 2006 - 11:08 PM

my guess would be that you're running session_destroy() in the included file.

I have start_session() in the included file, I tried removing that line, but it made no difference.


i'll assume you meant session_start();

#3 Neo55378008

Neo55378008
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 12 August 2006 - 03:47 AM

Heh, yeah session_start(), not start_session()




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users