[Mediawiki-l] cannot change LocalSettings.php

Brion Vibber brion at pobox.com
Mon Jan 15 22:20:18 UTC 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rob Church wrote:
> On 15/01/07, Ken Avonts <ken.avonts at telenet.be> wrote:
>> Warning: Cannot modify header information - headers already sent by (output started at /opt/www/avontsk/web/www.derepubliek.eu/vvp/wiki/LocalSettings.php:1) in /opt/www/avontsk/web/www.derepubliek.eu/vvp/wiki/includes/WebResponse.php on line 9
> 
> Check the top of the file for accidentally-inserted whitespace or
> garbage characters.

Note that some text editors like to insert an invisible character at the
beginning of UTF-8 files (the "byte order mark" or BOM).

The BOM character, unfortunately, breaks PHP files because it gets sent
to output before any of the code is run. If this happens before HTTP
headers are sent, it can cause the above error message and makes the
headers fail; if XML is output (such as RSS feeds), it causes the output
to be invalid XML, producing errors when the feed is loaded.

So it's necessary to save the file as UTF-8 _without_ BOM, if you have
the option available.

- -- brion vibber (brion @ pobox.com / brion @ wikimedia.org)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFq/4iwRnhpk1wk44RApD+AJ9KhYee7t/qE3kiHbzTH1Q0IEOO2gCgr8Gu
mSNqgiq7TVL/TMd/sSHxphw=
=LeuO
-----END PGP SIGNATURE-----



More information about the MediaWiki-l mailing list