UTF8 file format with BOM caused "already sent headers" -error

I have this error message:

Warning: it is not possible to change the header information - headers already sent (output is started in / Applications / MAMP / htdocs / --- / dbconnect.php: 1) in / Applications / MAMP / htdocs / --- / functions.php on line 84

This is dbconnect.php:

<?php if(!defined("INC")){
  define("INC", 1);
}
error_reporting(E_ALL);
require_once("config.mysqli.php");
@$mysqli = mysqli_connect($dbhost,$dbuser,$dbpass,$dbname) or die("No Db found");?>

Also tried:

<?php ob_start(null);
if(!defined("INC")){
  define("INC", 1);
}
error_reporting(E_ALL);
require_once("config.mysqli.php");
@$mysqli = mysqli_connect($dbhost,$dbuser,$dbpass,$dbname) or die("No Db found");
ob_end_clean();?>

Please let me know if you need more information. Thanks!

+4
source share
1 answer

It looks like you might have a specification error. See this post for more information: session_start () Error

+2
source

All Articles