XAMPP-win32 1.6.2 + UTF-8 = Problems

Problems with the Windows version of XAMPP, questions, comments, and anything related.

XAMPP-win32 1.6.2 + UTF-8 = Problems

Postby Kerven66 » 20. July 2007 09:16

Hello.

I've been an "XAMPP-win32 1.5.1" user and recently I've installed "XAMPP-win32 1.6.2". Something strange is happening since I'm using the last version. When I run a php file saved in "ISO-8859-1" format everything is OK, but when I save the same file in "UTF-8" format this error message appears:

Warning: Cannot modify header information - headers already sent by (output started at C:\htdocs\example\index.php:1) in C:\htdocs\example\index.php on line 2

The code of the php file is very stupid:

<?php
header('Content-Type: text/html; charset=utf-8');
echo "Hello";
?>

With 1.5.1 version never happened anything like this. In "C:\xampp\apache\bin\php.ini" "error_reporting" is set as "E_ALL & ~E_NOTICE" and "display_errors" is set as "On".

What's happening?

Thankyou.
Kerven66
 
Posts: 3
Joined: 20. July 2007 08:42

Postby Wiedmann » 20. July 2007 09:28

Don't save the UTF-8–encoded file with a BOM.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Kerven66 » 20. July 2007 09:29

Wiedmann wrote:Don't save the UTF-8–encoded file with a BOM.


What´s a BOM?
Kerven66
 
Posts: 3
Joined: 20. July 2007 08:42

Postby Wiedmann » 20. July 2007 09:38

Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Kerven66 » 20. July 2007 11:30



OK

Thankyou
Kerven66
 
Posts: 3
Joined: 20. July 2007 08:42


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 130 guests