Knowledge Base Article

PHP Error: Cannot modify header information

This 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.



Rating

Please indicate if this article was helpful for you.

rating :  4.3 from 5
views :  2059
votes :  23

Related Articles

Views

Haven't found what you are looking for? Suggest an article HERE.

powered by

Valid XHTML 1.0 Strict Valid CSS!