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.

Archive /

Our old forums are still available as a read-only archive.

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

Parse error silverstripe/sapphire/core/SSViewer.php on line 219

Go to End

8 Posts   2526 Views


Community Member, 3 Posts

30 April 2007 at 3:25pm

Hello Everyone,

I am getting the following error when trying to install silver stripe:

Parse error: syntax error, unexpected T_IF in /usr/home/ on line 219

Now, my server has both php4 and php5 installed. 4 is the default version. In the htaccess file I have

AddType application/x-httpd-php5 .php

Do I need to add anything else? Is this the problem even at all?


Forum Moderator, 922 Posts

30 April 2007 at 7:53pm

Edited: 30/04/2007 7:54pm

Usually if it's using PHP 4 it'll give something like unexpected T_OBJECT_OPERATOR... which version of PHP 5 is the server using? I also assume you are using 2.0.1?


Community Member, 3 Posts

1 May 2007 at 5:51pm

I am using PHP Version 5.1.6. My whole php info file is here:

I am using the latest version of Silver stripe


Community Member, 3 Posts

2 May 2007 at 4:52pm



Community Member, 1 Post

4 May 2007 at 3:47pm

I just had this problem as well... I "fixed" it by setting

asp_tags = Off

in my php.ini.

However, my install fails not long after that with a different error... hopefully you might have better luck.


Forum Moderator, 5521 Posts

6 May 2007 at 1:12pm

yes asp_tags has to be off for the SilverStripe <% if and control %> statements to function correctly. To turn the asp_tags setting off you will need to find your php.ini file and edit this line (It happens to be line 86 for me)

; Allow ASP-style <% %> tags.
asp_tags = Off


Administrator, 685 Posts

6 May 2007 at 4:19pm

Andrew - this is something that can be fixed, and probably should.

In SSViewer, replace references to "<%" and "%>" with '<'.'%' and '%'.'>'
This will prevent the strings from triggering the PHP tag code.

To test, you'll need to enable ASP style tags.


Community Member, 231 Posts

7 May 2007 at 1:10pm

All done :)