More information about the Underscore mailing list

[_] Error : PHP Warning: Cannot modify header information - headers already sent

Martin Moore martinm at it-helps.co.uk
Mon Mar 19 00:00:37 GMT 2018

I'm getting a "PHP Warning:  Cannot modify header information - headers already sent by (output started at /var/www/codeclink/login/index.php:2) in /var/www/codeclink/login/index.php on line 158"

My understanding is that line 2 is causing problems.



  
This is line 158 :  header('location:home.php');

I've removed some things but can't work out what's wrong. Even done all the stuff Google suggests lol.

Top of the file:

<?php session_start(); ?> // THIS IS LINE 1
<html>
  <head>
    <!-- <meta charset="utf-8"> -->
    <!-- <meta name="viewport" content="width=device-width, initial-scale=1"> -->

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">

<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

<!-- <link rel="stylesheet" type="text/css" href="style.css"> -->

</head>