2006-02-06

transmothra: (aaiiighhh!!)
2006-02-06 12:04 pm
Entry tags:

why does my browser sniffer script break all of a sudden?

my old browser sniffer that's worked so well for me for years, cobbled together from various sources, doesn't work when i upload it. funny thing is, no matter what i change, it always says the error is on line 1, which is of course the <?php delimiter. the next line is blank, and the few lines after that are comments. after that, it goes:
<?php showCode(); ?> )
it works perfectly locally, as it should. i'm on Apache 2.2.0 and PHP 4.4.1 (Win), whereas my host is using PHP 4.4.1 on Apache 1.3.34 (Unix).

the error i'm getting is either
Parse error: parse error, unexpected T_STRING in /real/path/to/html/sniffer.php on line 1
or ...unexpected T_FUNCTION..., depending on what i've tried to do to fix it.

i just don't get it. any ideas?
transmothra: (zippo trick)
2006-02-06 02:30 pm
Entry tags:

fixed

thanks to [livejournal.com profile] onah, for pointing out that i was saving in Wondows file format, when my host is on a Unix box. i had a feeling it was a line termination thing, since every time i made a change, the damn error would STILL claim it was line 1.