This question already has an answer here:
Got a strange one. Im working on a system and the login breaks when i move it from the development server to the live one, giving this error:
[21-Feb-2017 16:55:40 Europe/London] PHP Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/xxx/public_html/olympus/index.php:12) in /home/xxx/public_html/olympus/classes/login.php on line 28
It works fine if i move the session start directly to the top of the file. But where im confused, it works with no problems on the development server?
They are both cpanel servers, only major difference on the development server is its running cloudlinux. Any idea if any php setting would be causing this?
</div>
This means something is writing output before you call session_start - it is even telling you where (/home/xxx/public_html/olympus/index.php on line 12)
Without seeing that file its hard to know exactly what is outputing but other than the obvious output functions of echo/print etc. a common cause is newlines/whitespace before your opening php tags (or after your closing tags - which are optional and better to miss out altogether at the end of a file)