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.

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


7 Posts   3060 Views

Avatar
Jason

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/solvetechnology.com/htdocs/silverstripe/sapphire/core/SSViewer.php 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?

Avatar
Sean

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?

Avatar
Jason

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:

http://www.solvetechnology.com/phpinfo.php5

I am using the latest version of Silver stripe

Avatar
Jason

Community Member, 3 Posts

2 May 2007 at 4:52pm

Anyone?

Avatar
abryan17

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.

Avatar
Willr

Forum Moderator, 5523 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

Avatar
Sam

Administrator, 690 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.