On Mon, 22 Aug 2005 15:35:48 +0300, Jan Wagner <no_spam@thanks.net> wrote:
[color=blue]
>I'm running into a problem with php 4.1.1 on IIS (XP Pro version).
>For example writing a page test.php that starts with
>
><?php session_start(); ?>
>
>and saving the test.php in UTF-8 format in UltraEdit-32 or SciTE,
>then running the page, there's a complaint for session_start() about
>headers/page data having already been sent. If the same page is
>saved as "plain" ASCII, it works. Any ideas how to get an UTF-8
>encoded page to work in php 4.1.1, without upgrading?[/color]
Odds are you have a UTF-8 BOM (Byte Order Marker) at the start of the script.
In Ultraedit:
Advanced, Configuration, General tab,
Scroll to "Load/Save Conversions"
Disable the two "Write UTF-8 BOM" options.
http://bugs.php.net/bug.php?id=22108 appears to indicate that UTF-8 encoded
PHP scripts with a leading BOM is basically not supported, for reasonable
reasons (it can't tell if it's a BOM to ignore, a BOM that should be sent, or
actually some binary data that happens to look like a BOM).
Since you can always save it without a BOM that's not too bad.
--
Andy Hassall ::
andy@andyh.co.uk ::
http://www.andyh.co.uk http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool