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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

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

Problem with "unexpected character in input: '\'


Go to End


7 Posts   3000 Views

Avatar
DesignCollective

Community Member, 66 Posts

13 June 2010 at 1:29pm

Edited: 15/06/2010 8:26pm

An installation of 2.4 throws a "Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/maria1/public_html/cms/sapphire/core/SSViewer.php on line 304". This one is a 2.4 too on webhostingpad.com.
Check out http://www.maria-angelica.com/cms/.

What am I missing?

Thanks.

Avatar
MarioSommereder

Community Member, 107 Posts

15 June 2010 at 8:12pm

I've got the same problem:

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /sapphire/core/SSViewer.php  on line 304

The misterious line 304 is:

$content = ereg_replace('<' . '% +_t\((\'([^\.\']*)\'|"([^\."]*)")(([^)]|\)[^ ]|\) +[^% ])*)\) +%' . '>', '<?= _t(\''. $identifier . '.ss' . '.\\2\\3\'\\4) ?>', $content);

The server I installed SS on has already an earlier version on it that works. I can't even log in now. Please, can anyone tell me, how to solve that?

Thanks in advance!

Avatar
DesignCollective

Community Member, 66 Posts

15 June 2010 at 8:27pm

Removed the other reference as it was just me using an older version of a particular php. The current problem however still persists and I have no clue as to what could be causing it.

Avatar
MarioSommereder

Community Member, 107 Posts

16 June 2010 at 12:16am

WTF!? Just switch off PHP asp_tags and it works perfect...

Avatar
DesignCollective

Community Member, 66 Posts

16 June 2010 at 8:27pm

Yeah and I am on a shared host and it looks like the setting from a local PHP.ini doesn't work. :/ Thanks, though!

Avatar
pelse

Community Member, 14 Posts

17 June 2010 at 3:56am

Servus,

If you can not switch the PHP 'asp_tags', you can delete the lines 286 and 301 in SSViewer.php.
The troublemakers are the <% ... %> (ASP Tags) in the comments.

Avatar
SightUnseen

Community Member, 28 Posts

2 July 2010 at 3:40pm

pelse; thank you for helping where others could not. Much appreciated.