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 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. 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. 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. Link to comment https://forums.phpfreaks.com/topic/265692-session_start-question/#findComment-1361625 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.