Answer the question
In order to leave comments, you need to log in
Why is there an error when installing Yii2?
I work via PUTTY
1. The version on the php 5.4 server is enabled
hosting on ukraine.com.ua
2. I create aliases
echo "alias php='/usr/local/php54/bin/php'" >> ~/.bashrc
echo "alias composer ='php ~/composer.phar'" >> ~/.bashrc
source ~/.bash_profile
3. Download Composer
curl -sS https://getcomposer.org/installer | /usr/local/php54/bin/php -- --install-dir=/home/site.com
4. Run /usr/local/php54/bin/php composer.phar
5. Install composer asset plugin (manages package dependencies bower and npm):
/usr/local/php54/bin/php ~/composer.phar global require "fxp/composer-asset-plugin:~1.0.0"
6. Install Yii2
/usr/local/php54/bin/php ~/composer.phar create-project yiisoft/yii2-app-advanced www
everything is ok here!
BUT ERROR at the stage of launching the init file
7. I write ./init
gives
Parse error: syntax error, unexpected T_FUNCTION in /home/tiptopcl/tiptop-club.com/www/init on line 70
Answer the question
In order to leave comments, you need to log in
Gotta write
In case you don't specify it + the PHP version must be at least 5.4, i.e. Probably in your case you should write:
/usr/local/php54/bin/php init
If by default the hosting uses an earlier version.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question