apw Posted July 15, 2012 Share Posted July 15, 2012 Hello I have on my website login page this: Sessionn_start(); if(isset($_session['player'])) { Session_destroy(); Even with the cache cleared im getting cannot send session cache limiter headers already sent How i fix this? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/265692-session_start-question/ Share on other sites More sharing options...
DavidAM Posted July 15, 2012 Share Posted July 15, 2012 See the sticky: HEADER ERRORS - READ HERE BEFORE POSTING THEM Post your code from the start of the file AND PUT IT IN CODE TAGS Post the ENTIRE error message so we know where to start looking. This statement Sessionn_start(); is completely invalid. It should not start with a capital letter, and it should not have two "n's" in it. If this is the way it is written in your source file, you need to 1) Fix it! and 2) Turn On Error Reporting so you see these errors and can fix them. By the way, Session_destroy(); should not be capitalized, either. Quote Link to comment https://forums.phpfreaks.com/topic/265692-session_start-question/#findComment-1361609 Share on other sites More sharing options...
hakimserwa Posted July 15, 2012 Share Posted July 15, 2012 header errors are problems with the php white space. you should start the session writgh at the top before any html or php codes and wrapp it around the opening and closing php tags. Quote Link to comment https://forums.phpfreaks.com/topic/265692-session_start-question/#findComment-1361617 Share on other sites More sharing options...
Barand Posted July 15, 2012 Share Posted July 15, 2012 @DavidAM PHP functions are not case-sensitive. SeSsIoN_StaRt() would work just as well. Quote Link to comment https://forums.phpfreaks.com/topic/265692-session_start-question/#findComment-1361625 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.