jamesxg1 Posted February 23, 2010 Share Posted February 23, 2010 Hiya! I am getting these errors. Warning: session_destroy() [function.session-destroy]: Trying to destroy uninitialized session in C:\Program Files\xampp\htdocs\site\myaccount.php on line 35 Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\xampp\htdocs\site\myaccount.php:35) in C:\Program Files\xampp\htdocs\site\myaccount.php on line 36 Warning: session_destroy() [function.session-destroy]: Trying to destroy uninitialized session in C:\Program Files\xampp\htdocs\site\system\template\template.php on line 108 Just wondering what this means ? Many thanks James. Link to comment https://forums.phpfreaks.com/topic/193015-session-errors-s/ Share on other sites More sharing options...
ialsoagree Posted February 23, 2010 Share Posted February 23, 2010 The first warning means that you ran the function session_destroy() when no session was started. The 2nd error happened because the 1st error was written and then you tried to manipulate the headers (possibly through making/editing/deleting a cookie). Since HTML has already been sent to the browser, the headers have also been sent to the browser and can't be manipulated. The 3rd error is a repeat of the first error in a different place. Link to comment https://forums.phpfreaks.com/topic/193015-session-errors-s/#findComment-1016504 Share on other sites More sharing options...
ohdang888 Posted February 23, 2010 Share Posted February 23, 2010 the VERY first line of code at the VERY top of your page needs to be: <?php session_start(); ?> Link to comment https://forums.phpfreaks.com/topic/193015-session-errors-s/#findComment-1016534 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.