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.
  • 0 Korisnici koji smatraju članak korisnim
Je li Vam ovaj odgovor pomogao?

Vezani članci

Error: Sessions directory is not writable

By default, such an error is received when you use a custom php.ini file and the directive...

HTTP Error 403 - Forbidden

Generally. the HTTP error 403 - Forbidden means that access to the file/folder you are trying to...

HTTP Error 404 - Not found

Below we will focus on the two most common reasons for a website to display a "404 Not Found"...

HTTP Error 500 - Internal server error

When you receive an error "Internal server error 500" on your site, the best way to find the...

HTTP error codes explained

There are multiple HTTP codes that you may come across. Below you can find a summary of the most...