Alright I know multiple people have asked this question, but I am having really strange behavior. My code is following and as you can see I did NOT start output before starting the session.
These are always the first lines in my file
<?php
require_once("core/init.php");
//Is user already logged in?
if(remember::isLoggedIn())
{
header("Location: me");
}
$bg = background::latestBackground();
?>
And this is my init.php
<?php
session_start();
//Include needed files
require_once("functions.php");
require_once("Mobile_Detect.php");
//Detect device type
$detect = new Mobile_Detect;
?>
Thanks in advance