Jump to content

Sessions don't work


Skullptor

Recommended Posts

The session statement was working and then I made a change to the pages and now the sessions will not work. It doesn't carry the variable information forward to the next page. If I insert a session start command I get an error message stating that the sessions have already started. I'm out of ideas on how to fix this.

Link to comment
Share on other sites

yeah, we need the code. If the SESSION has started, then the SESSION has started. if you are including files with session_start in a file that already has it, then that would be a problem. Also, the error might be telling you where it was already started.

Link to comment
Share on other sites

If I posted the code incorrectly I apologize. I don't ususally use forums becuase it takes time to get responses. The LMBconnect.php is only the connection to the database and thesession_start() is not in that file. If I start the session somewhere within the site then I should be able to use session variables until such time I kill the session. That's why I'm confused with this problem. I just inserted the sessio start in the login page and here are the error messages. If I remove the session start from the login page the errors disappears but the variable doesn't work either. Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/content/62/8168562/html/memberlogin.php:1) in /home/content/62/8168562/html/memberlogin.php on line 2Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/62/8168562/html/memberlogin.php:1) in /home/content/62/8168562/html/memberlogin.php on line 2

Link to comment
Share on other sites

there are code box tags in this forum. Please post all code in them and make sure it's indented, formatted, and easy to read. onto your problem, where are you calling session_start though? Which file throws the error? What exactly does the error say? The error should tell you where to look. You also didn't include the code for LMBmemconnect.php. Is that important at all? Consider revising your post to focus on the specific parts that are causing the issue.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...