Jump to content

Three Linux ApachePHP servers. One has a problem.


sepoto
 Share

Recommended Posts

I have three servers running Linux with Apache and PHP installed. The same source code sits on each one. I am using <?php include('myfile.txt'); ?> to include some. When I look at the said text it displays properly on two out of the three servers. On (GoDaddy.com) one of the servers I see garbage charachters in my text. The text file is encoded in UTF-8. Has anyone experienced a problem like this before.

Link to comment
Share on other sites

Are the gibberish craracters only the "яю" at the start of each block?Looks like a BOM issue. Apparently, the PHP version they're using is different from that of the other two server, and in this version, there's sort of a bug (only sort of...) that PHP reads and ouputs the BOM.The best way to fix this is to edit the text files with an editor other than notepad, and when prompted, save the file as "UTF-8, no BOM". Notepad can only write UTF-8 with BOM.

Link to comment
Share on other sites

That's very interesting I've never come across a BOM issue before. The first thing I would have assumed was that the text files were being stored in raw binary or that there was an accidentalconversion somewhere. Good work boen. Your wealth of knowledge is humbling.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...