Today, I find my yii app works well on my win platform and wrong after my uploading it to Unix.

all files are the same.

at last, I found out the reason is config/main.php, which BOM is not dropped and work well under win OS.

however, when I uploaded all of them to my site:, the captha verify didn’t work,

it made me crazy.

after exchanged many files, I found out the trouble was from BOM of main.php, although Win OS could accept it whether it existed, but Unix OS did not.

Are there other troubles caused by this BOM?

please share your experiences, thank you.

I’m not exactly sure under what conditions a BOM may cause errors, but I had the problem a while back on Windows and it made me crazy as well. The PHP parser seems to have problems with it. Just make sure you have the correct setting in your Editor. For example I use PHPDesigner and there is a checkbox like “Include BOM”. Also I’ve used Adobe Dreamweaver before and from time to time a BOM just got dropped into one of my php files. Then I had to use hex-editors to delete it… :angry:

I don’t know of any other troubles. It’s just the problem with the php parser I think.

Was the BOM already in the main.php which you may have downloaded from here?