You could try including the init.php file in your settings.php file like so:
require_once('../../template/header.php');
require_once('../../core/init.php');
And remove the call from the header.php file.
Any reason why you're calling the init.php file from header.php?
Or you can just have everything in your init.php file (the db connection, functions, and templates) which you can then include in your files.
/home
/core
/init.php
/dbcon
/connection.php
in your init.php file
require('dbcon/db_connection.php');
require('../template/header.php');
in your setings.php file
include('../../core/init.php');