Since I began using UltraEdit as a programming text editor recently, I lost the ability to call the header() function in PHP. Every time I tried it in a script, the following error happened: "Cannot modify header information - headers already sent."
This error happens whenever a script produces output before header() is called. When obvious causes for this problem have been ruled out, you must look for anything that might output a blank line or other characters.
In my case, UltraEdit put three characters at the beginning of a UTF-8 file without displaying them in the editor, so I didn't spot them until I opened one of the errant scripts in vi.
These characters are a byte-order marker, as described in the UltraEdit support forum, and here's how to turn this feature off:
- Choose . The General tab should be in the front.
- Scroll down to the Load/Save/Conversions section.
- Deselect the two checkboxes.
There's a possibility I've incurred the wrath of the Unicode gods by making this change, but at least my PHP scripts work.