I have read through the numerous posts here on SO about header errors, and been all through Google, but none of the proposed solutions seems to be what I need. I don't have extra spaces; heck, I'm not even actually sending a header(), but I'm still getting this error:
Warning: Cannot modify header information - headers already sent by (output started at header.inc.php:20)
The first 21 lines of header.inc.php are:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>LocalKarma.org - What goes around comes around!</title>
<link rel="stylesheet" href="css/standardize.css">
<link rel="stylesheet" href="css/styles.css">
<link rel="stylesheet" media="only screen and (max-width: 5in),
screen and (min-width: 200px) and (max-device-width: 640px) and (orientation:portrait) and (max-width: 5in),
screen and (min-width: 600px) and (max-device-width: 1280px) and (orientation:portrait) and (max-width: 5in),
screen and (min-width: 600px) and (max-device-width: 1280px) and (orientation:portrait) and (min-width: 6in)" href="css/mobile.css">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="icon" href="/favicon.ico" type="image/x-icon">
<link href='http://fonts.googleapis.com/css?family=Lora:400,700' rel='stylesheet' type='text/css'>
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<script src="scripts/html5shiv-printshiv.js"></script>
<![endif]-->
<?php
$pageName = $_SERVER['REQUEST_URI'];
I have tried moving part of my php up before the DOCTYPE (Line 21: $pageName = $_SERVER['REQUEST_URI'];
) so there would be php before the html. Nope. I tried changing all the code so that it was php output, echoing out all the html. Nope. Since this is an include file, I have looked all through the other includes that are included before this one, as well as including this one before the other ones. Nope. And… several other things that didn't work.
Any other suggestions? I assume it's something really simple and I'm just not seeing it :)