Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Cant install Grav

Started by Muut Archive 11 years ago · 4 replies · 339 views
11 years ago

Hello! Im trying to install grav, so cloned form Git, no problems. Then running bin/grav install and here it is -

PHP Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /bin/grav on line 13

My CLI - PHP 5.6.5-pl0-gentoo (cli) (built: Jul 13 2015 18:52:22)

Same issue with any Grav CLI command
Any suggestions?

11 years ago

First, the simplest way to install Grav is with the pre-built package, as it contains everything you need, just unzip and point your browser at it. Those are available in the downloads site or in the "releases" tab of github.

Second, a parse error usually means an older version of PHP. Can you confirm you are running PHP 5.6 as you say? just type php -v from your terminal.

If you look at line 13 of bin/grav you will see it just says: use Grav\Common\Composer;

The error you are seeing is something you would see if you were running < PHP 5.3: http://stackoverflow.com/questions/13960277/error-parse-error-syntax-error-unexpected-t-string-expecting-t-constant-encap

11 years ago

@rhukster, Originally php -v results 5.2 version (only CLI, phpinfo gives me PHP Version 5.6.5-pl0-gentoo). but my hosting provider recommend me to use these commands to change it:
echo "alias php=/usr/lib64/php5.6/bin/php" > ~/.bashrc
source ~/.bashrc

But bin/grav list command (for example) gives me the same old error (trying on zipped version now). Its strange!

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1345 9 years ago
Archive · by Muut Archive, 9 years ago
2 932 9 years ago
Archive · by Muut Archive, 9 years ago
2 4059 9 years ago
Archive · by Muut Archive, 9 years ago
1 2945 9 years ago
Archive · by Muut Archive, 9 years ago
3 1117 9 years ago