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.

Installing SilverStripe

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

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

Install problems


Reply

4 Posts   1463 Views

Avatar
EasyLivin

20 July 2010 at 1:27am Community Member, 1 Post

When I try to install SilverStrpe I get this message "Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting T_STRING in /kunden/159279_97618/webseiten/micro/sapphire/core/SSViewer.php on line 304" and inststallation stops...

I'm using Silverstripe version 2.4

Avatar
Sean

20 July 2010 at 9:14am Forum Moderator, 921 Posts

Hi there, which server setup are you using including PHP
version?

Avatar
abyss

9 September 2010 at 8:58am (Last edited: 9 September 2010 9:20am), Community Member, 5 Posts

Hi,

I ran into the same issue during installation using a clean Silverstrip 2.4.1 installation package on a Server hosted at Domainfactory.

Some of my settings:
- PHP 5.3.1 (Server API CGI/FastCGI on a Linux OS)
- safe_mode: off, asp_tags: off

Error message:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting T_STRING in sapphire/core/SSViewer.php on line 321

What worked for me:
I wrapped a multiline comment around the single line comments located around code line 321:

// $content = "<!-- getTemplateContent() :: identifier: $identifier -->". $content;
// Adds an i18n namespace to all <% _t(...) %> calls without an existing one
// to avoid confusion when using the include in different contexts.
// Entities without a namespace are deprecated, but widely used.

this code finally worked (think it´s the closing %> in the comment which cause trouble ...

// $content = "<!-- getTemplateContent() :: identifier: $identifier -->". $content;
/*
// Adds an i18n namespace to all <% _t(...) %> calls without an existing one
// to avoid confusion when using the include in different contexts.
// Entities without a namespace are deprecated, but widely used.
*/

If this is really the issue, this should be fixed in SVN as well.

Cheers

P.S.: Forgot to mention that a previous installation on my local Windows 7 (64bit) computer with [url=http://www.apachefriends.org/de/xampp-windows.html]XAMPP 1.7.3[/url] worked without any issues (works with the original and modified SSViewer.php file)

Avatar
abyss

24 September 2010 at 5:57am (Last edited: 24 September 2010 5:58am), Community Member, 5 Posts

Among others, this bug is fixed in SilverStripe v2.4.2 :-)