Jump to content

[SOLVED] Php File Encoding


luckatpf

Recommended Posts

Hi, im trying to write my website and im facing an issue with the session_start() function and some others functions, im getting an "output started at line NN" like message.

I already checked the spaces and characters in all of my php files. Then doing some reading i found the origin of the issue, ZendStudio for Eclipse is setup to save files with UTF-8 character set, and this adds up to 3 weird characters to my files before the "<?php>" tag. So i switched to US-ASCII the entire project. But now i cannot put punctuation (since the site is in spanish), and if i switch back then... site stops working.

Any suggestions?

Link to comment
https://forums.phpfreaks.com/topic/166396-solved-php-file-encoding/
Share on other sites

For all those facing this same issue, i've found the reason and a solution.

I used Web Expression during the site editing, and it seems to add a Byte Order Mask (BOM) that is located at the beginning of the file, and that would be before the <?php ?> tag, that happens only with the version 1 (according to some pages i've read).

So the solution is either use another editor or remove the byte order mask.

I did open some of the pages with "edit" command under a console box start > run > cmd > edit and i saw that weird coulple of characters in the file.

 

So its not a zend studio issue...

Thanks anyway.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.