Quite some time ago, I moved hosting to Godaddy and for about a month had similar Mysql problems which were eventually resolved after this support ticket:
As I understand it, the key thing is that your session_start() is called before any output to the browser, because the function attempts to set a cookie, which can’t be done once browser output has started. So in your case, as long as the connection.php include file doesn’t output to the browser, then it doesn’t matter that it appears before the session is started.
Yes, there’s a lot of checking missing. There’s no check that $_SESSION['username'] exists before assigning it to $user_check` and using it in a query, and there’s also no check whether the query returned anything before fetching the details and using them for another variable.
I presumed that error message really indicated some sort of timeout, but the documentation also suggests it can occur if the database connection has been closed.
I doubt it - sending session_start() at the wrong time would normally just give a “headers already sent” error message.