got "headers already sent" warning when i used translate.php
Hello,
when i used translate.php in /includes
i got this error:
Warning: Cannot modify header information - headers already sent by (output started at /home/admin/domains/xxxxxxxx.com/public_html/includes/translate.php:1) in /home/admin/domains/xxxxxxxx.com/public_html/html/header.php on line 6
this error showed on the homepage and other subpages.
how can i fix it?
hello,
i sorted out the problem:
i do my translation and send the file as usual. and there is no such warnings. however non-english characters that are among the translated words get crumbled. so i open the translate.php file in word editor and save as "utf 8" and not "ansi". i upload the translate.php to its place.. the non-english characters show up correctly, but i get the above warning.. its either i get the above warning or i get the non-english chars crumbled..
any suggestions?
Hello,
This sounds like your text editor is saving a UTF-8 "BOM" at the top (Byte Order Marker), which causes PHP to being output and generates the headers already sent warning.
In your text editor, use File > Save As..., and then look for a save as type or Character Encoding menu - then you should be able to choose UTF8-NO BOM, which should fix the problem.
If you're not sure, if you would like to email me your modified includes/translate.php I'll check it out for you...
Cheers,
David.
--
PriceTapestry.com
Hi there,
All this will mean is that some white space (space characters or carriage returns) outside of the PHP tags have got into your includes/translate.php. All you need to do is re-edit the file, and make sure that there is nothing outside of the PHP tags - that should be all it is!
Cheers,
David.
--
PriceTapestry.com