0

My website was working fine until today when I got the following error: session cache limited and for some reason, my site keeps telling me to logout out even though that I already have logged out...I don't thik I have anything outputted before the session tag...

I tried to set the header so that it has expired so that I can login but it doesn't work.

This is my php code for index.php

<?php
include_once __DIR__.'/header2.php';

if (!isset($_SESSION['u_uid'])) {
   echo "<meta http-equiv='refresh' content='0;url=header2.php?index=mustloggedoutfirst'>"; 
   exit();
} else {


include_once __DIR__.'/viewcounter.php';

include_once __DIR__.'/includes/dbh.php';


}


?>

and this is the php code for header2.php

<?php 
session_start();
?>
piano0011
  • 23
  • 6
  • I checked the other thread but I have no output before the session for my code – piano0011 Jun 09 '19 at 03:04
  • You have output before the mentioned code, otherwise php wouldn't show the error. Please check the linked duplicate https://stackoverflow.com/questions/8028957/how-to-fix-headers-already-sent-error-in-php in detail, it is all described there. – Progman Jun 09 '19 at 08:45

0 Answers0