17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 4455 Views |
-
from tarball release: Parse error: syntax error, unexpected T_OBJECT_OPERATOR

22 April 2007 at 9:54pm
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/brenda/projects/silverstripe-v2.0/install.php on line 538
I'm on ubuntu edgy eft
apache 1.3.34-4.1
php 5.2.1-0
mysql 5.0.38-0 -
Re: from tarball release: Parse error: syntax error, unexpected T_OBJECT_OPERATOR

22 April 2007 at 10:17pm Last edited: 22 April 2007 10:18pm
I think this usually happens when Apache is using PHP4 instead of 5. Perhaps you have both 4 and 5 on there, but .php files are executed using PHP4. I know packages like MAMP for Mac have two versions of PHP, that you can switch around. Try adding this line to your .htaccess file for where SilverStripe is installed:
AddType application/x-httpd-php5 .php
Hope this helps!
Cheers,
Sean -
Re: from tarball release: Parse error: syntax error, unexpected T_OBJECT_OPERATOR

23 April 2007 at 10:48am
You are correct - so i wrote a patch
at the top of install.php, detect the version, and die with a useful message if it's < 5.
http://darcs.coffee.geek.nz/silverstripe/core/install.php.patch
and move the classes to their own file (probably needs moving)
http://darcs.coffee.geek.nz/silverstripe/core/InstallRequirements.phpseems to me, writing a small bit of php4 compatible code in install.php will save you support requests later.
-
Re: from tarball release: Parse error: syntax error, unexpected T_OBJECT_OPERATOR

23 April 2007 at 11:43am Last edited: 23 April 2007 11:44am
Yeah we had changed the line a while ago but somehow this patch didn't get through to the 2.0.1 release
$query = DB::query("SELECT ID FROM SiteTree WHERE URLSegment = 'about-us'");
if(!$query->value()) {(Please note that with the installer script parsing, it is now simply able to tell you to upgrade to PHP5. It doesn't permit you to install. But atleast you get instructions instead of a ambiguous PHP error).
PS: I commented on http://www.coffee.geek.nz/2007/04/22/silverstripe_review_attempt.html but either it now awaiting moderation, or went nowhere; I can't see my comment ;)
-
Re: from tarball release: Parse error: syntax error, unexpected T_OBJECT_OPERATOR

23 April 2007 at 11:49am
comment approved (the urls caught in the spam filter).
i'll wrangle apache a bit, and then post a followup.
| 4455 Views | ||
|
Page:
1
|
Go to Top |



