Jump to content

Sessions and include()


Neo55378008

Recommended Posts

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.
Link to comment
Share on other sites

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

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

i'll assume you meant session_start();
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.