17452 Posts in 4473 Topics by 1971 members
|Go to End|
30 April 2007 at 3:25pm
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?
30 April 2007 at 7:53pm Last edited: 30 April 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?
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
2 May 2007 at 4:52pm
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.
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
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.
7 May 2007 at 1:10pm
|Go to Top|