"Cannnot modify header information" PHP Error

You may encounter the following PHP error:
Warning: Cannot modify header information - headers already sent by (output started at)
This is typically caused by HTML being sent after PHP is already sent. If you have this issue on an application such as a forum, blog, or other managed CMS it may have happened because you accidentally added a space or other character at the very end or beginning of the PHP file, before or after the PHP tags <?php or ?>. Check the beginning and end of any recently modified files and ensure that no extra characters are added.

If you still have no luck, add the following PHP code to the very top and very bottom of your PHP script (e.g. in the header and footer PHP includes, if applicable)

At the top:

<?php ob_start(); ?>
and at the bottom:

<?php ob_end_flush(); ?>
This should prevent this error from appearing.
  • PHP
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

How long do domains take to propagate?

Domains usually take anywhere from 15 minutes to 3 hours to propagate, although this process may...

Do you support DNSSEC?

We can enable DNSSEC for domains registered through us upon request. Please create a support...

Domain name is suspended

After registering or transferring your domain to us, an e-mail will be sent to the registrant...

Unwanted spam, emails, or calls?

If you are receiving unwanted communications after registering a domain, it's likely that WHOIS...

Can I upgrade my plan in the future?

Most of the time, we can upgrade your plan upon request. If you want to start out with a smaller...