Closed (duplicate)
Project:
Drupal core
Version:
7.x-dev
Component:
install system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Dec 2009 at 13:33 UTC
Updated:
26 May 2010 at 15:38 UTC
A speedbump. Uploaded tar file, extracted. When i go to the new directory I get:
Parse error: syntax error, unexpected '{' in [...]/drupal7/includes/bootstrap.inc on line 660
if i go to /install.php i get:
Parse error: syntax error, unexpected '{' in [...]/drupal7/install.php on line 81
Comments
Comment #1
hija commentedForgot, Using this release:
Nightly development snapshot from CVS branch: HEAD
Last updated: December 25, 2009 - 14:04
Comment #2
asimmonds commentedBoth of these lines are the start of a try {} block.
My guess is that you are attempting to use PHP 4 instead of PHP 5.2 (or later)
What is your PHP version?
Comment #3
asimmonds commentedJust confirmed that this error is generated when you try install.php with PHP 4 (tried 4.4.9)
So you should upgrade your PHP version to (at least) 5.2 if you want to try Drupal 7
Comment #4
hija commentedThank you!
you were right!
For some reason php5 seemed installed but i removed and reinstalled and now everything is running smooth!
I can see that the requirements page further inside the installation says i have php 5
yet this is completely useless if i can never reach this screen without having it enabled
how about moving the requirements screen before the error?
Comment #5
hija commentedChanged the title (was " Can't install! unexpected '{' ")
Not sure if I shouldn't have turned this to active though.
Any opinions?
Comment #6
marcingy commentedComment #7
gpk commentedAs a minimum we need a handbook page (Troubleshooting/FAQ) about this error.
Even so, I wonder how many (hundreds??? thousands???) of forum topics there will be about this. The original op thought they had PHP5 enabled.. a simple check + error message would save many people many hours (including all the helpful people who assist in the forums). Many people's first experience of Drupal will otherwise be a parse error. Not quite sure how it would be best done though, given the structure of bootstrap.inc.
Comment #8
dave reidDuplicate of #315901: Add server capabilities check to installation/upgrade tasks
Comment #9
kenorb commented#720742: try/catch in bootstrap.inc leads to fatal error with PHP 4 in installer