Neo55378008 Posted August 11, 2006 Share Posted August 11, 2006 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 sessionIf 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 https://forums.phpfreaks.com/topic/17295-sessions-and-include/ Share on other sites More sharing options...
akitchin Posted August 11, 2006 Share Posted August 11, 2006 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 https://forums.phpfreaks.com/topic/17295-sessions-and-include/#findComment-73406 Share on other sites More sharing options...
Neo55378008 Posted August 12, 2006 Author Share Posted August 12, 2006 Heh, yeah session_start(), not start_session() Link to comment https://forums.phpfreaks.com/topic/17295-sessions-and-include/#findComment-73548 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.