Forum Moderators: coopster

Message Too Old, No Replies

Seeing A`s in Browser

PHP or browser problem?

         

dreamcatcher

2:32 pm on Oct 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I didn`t know which section to post this in but here goes.

I know someone who has a PHP script set up on his server. The language file is as such:

$lang['msg1'] = "whatever";
$lang['msg2'] = "whatever";

etc

Now when he accesses any file in his browser on his own computer, where the language should appear, he see`s a A. I would imagine this is because the language file is using an array construct.

When I access the same script on his server in my OWN browsers on my OWN computer, I see everything fine. Strange.

Does anyone know what causes this?

ergophobe

4:31 pm on Oct 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Is it a plain ASCII 'A' no funny marks or diacriticals? Normally when PHP is asked to echo an array, it just says 'Array' not 'A'. On the other hand, if the character encoding is mixed up, you'll often get As with accent marks and such.

dreamcatcher

4:51 pm on Oct 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks ergophobe. Its just a plain A.

Could it be that the files have been uploaded in ASCII instead of binary?

mincklerstraat

5:13 pm on Oct 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This sounds very weird to me too and I'm not sure I'll be able to say anything enlightening, but I do have a couple of questions. You say 'when he accesses a file on his server' - you do mean normally, via http protocol & such, and not using the browser as a file manager?

Could you have your friend view source, and say what the output is around these A's? And maybe ask your friend which script it is, and if there's any chance it's leaving cookies, swiping cookies etc. , also any chance it's doing special stuff on the basis of http-accept headers.

If this doesn't work, you could at the end of the script run:
print_r(get_included_files());
and compare outputs.

dreamcatcher

5:28 pm on Oct 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



mincklerstraat,

Actually, the script was written by myself. Its the first time anyone has had any problems with it. He has uploaded the files in ASCII mode, so I have told him to reupload the 'lang' directory in binary to see what happens.

The problem is when he views it in any browser on his comp. On my own comp and on two friends comps I see everything ok. I`ll ask him what his source code is displaying.

dreamcatcher

6:06 pm on Oct 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



ah, it seems ok now. A clear up of his comps temp files has corrected the issue.

Thanks guys. :)