Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

warning: Unexpected character in input?


Reply


4 Posts   1584 Views

Avatar
Trenatos

Community Member, 15 Posts

5 March 2011 at 7:27pm

This is weird.. But sometimes I get this error when I try to open my website: "warning: Unexpected character in input: ''' ASCII=39 state=1 in tmpsilverstripe-cache-hermes-bosweb-web222-b2224-ipg.marcusfernstromcommanifest-main on line 5315"

It seems to happen RANDOMLY, which causes me even more confusion. Hit reload and it works fine O_o
Anyone have an idea what is going on..?

I'm sorry if similar questions has been asked before, but the search function for the forum is really horrible, so hard to adjust searches..

Avatar
swaiba

Forum Moderator, 1804 Posts

6 March 2011 at 12:40am

Hi Trenatos,

I honestly don't know, but Imight suspect...
a)data after a closing php tag, personally I don't close my php tags in (?>)
b)somehow, somewhere you have a dodgy character in a file... I use TextPad alot and if I accidentally hold Alt oir Ctrl with a keypress it inserts a non-ASCII character into the text and saves it.

hope this helps

Avatar
Trenatos

Community Member, 15 Posts

6 March 2011 at 9:15am

Thing is that it seems to happen randomly.
If it happened every time I opened a page I would suspect that as well, but the random aspect makes me very confused..
I'll see if it continues, I might wipe and install a fresh copy..

Avatar
frankmullenger

Forum Moderator, 53 Posts

31 March 2011 at 4:43pm

I had a similar error, it was due to a parse error in one of my PHP files (http://www.php.net/manual/en/function.token-get-all.php#79502). Basically I had an enum with: 'Something' => "Enum('Onething, Anotherthing', 'Onething)"

And I was missing an ' before the last parenthesis.