What does “headers already sent” mean?

Quick answerBeginnerUpdated

Short answer

Your script tried to send a header — a redirect, a cookie — after output had already started. The usual culprit is a blank line or a stray space before the opening <?php tag in an included file. The error message names the file and line that produced the output.

Learn more

Choosing a host for a PHP project? Every Traxio account runs PHP 7.4 to 8.3 with a MySQL database: see PHP and MySQL hosting, free for the first 30 days, then £0.99 a month.

All PHP questions · All questions and answers

Popular

Tip: press / to search from any pageSee all results