Skip to:

Re: Unable to login – cannot modify header information

Just wanted to add a note to save someone out there a bit of agony around config.php and extra characters.

I had edited my config.php file and was getting the “Warning: Cannot modify header information…” error upon admin log-in.

But for the life of me, I couldn’t find any whitespace before the “<?php” tag.

And then I remembered…

I had edited the file with Expression Web. I know, I know, my bad. But it just looked nicer, was easier to edit. BUT as I found a few years ago, it has a tendency to add an invisible character before files. Only way to see this would be in a byte editor.

So then I went back to the original sample config.php file, did a new version of my edits, this time in Notepad (good old notepad) and it worked beautifully.

I think the lesson is “mind your text editor.”

Skip to toolbar