PHP Error: Cannot modify header information

his is a common PHP error which is usually caused by:

- White spaces before or after the PHP start "<?php" or end "?>" tags;

- Various problems with the header() statement. Check carefully the code before and at the line of this statement.

This error might be hard to troubleshoot in cases where different files are included and all of them have to be carefully expected. An easy workaround is to place a php.ini file containing the following directive:

output_buffering = On

This php.ini file has to be placed in the directory where the error occurs.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Does Hostlantern support PHP HTTP Authorization?

Hostlantern supports the PHP HTTP Authorization and in order to enable it you need to add the...

Is PHP Safe Mode turned Off on Hostlantern’s servers

PHP Safe Mode is by default turned off for all PHP versions available on Hostlantern servers....

How to enable zlib compression manually for PHP scripts

PHP Zlib module allows you to transparently read and write gzip compressed files. Thus it is used...

What is SourceGuardian and how to use it?

SourceGuardian is commercial software which allows you to securely encode, compile and encrypt...

How to install Smarty Template Engine

Follow the steps below to install Smarty Template Engine on your hosting account: Download the...