Jump to content

Archived

This topic is now archived and is closed to further replies.

Neo55378008

Sessions and include()

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.

Share this post


Link to post
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();

Share this post


Link to post
Share on other sites

×

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.