Yii2 Newbie Issue

Just installed a fresh version of Yii 2 via the Composer method. One gotcha is that depending on how you installed Composer will change how the example install works. Not hard to figure out but passing along so other can avoid a dumb founded look…

If composer is installed via this example (from the composer install link)


curl -sS https://getcomposer.org/installer | php 

mv composer.phar /usr/local/bin/composer

The examples given of -




php composer.phar create-project yiisoft/yii2-app-basic basic 2.0.3

Won’t work and will result in a message to the order of can’t find composer.phar file. If you do encounter this just run the command (for basic, similar for advanced) as follows -




composer create-project yiisoft/yii2-app-basic basic 2.0.3

HTH

Sandy

The reason that the suggested command won’t work is because your second command was to rename composer.phar to /usr/local/bin/composer, putting it into the path. Without the renaming, the suggested command would work fine.

Thanks, and yes not a huge problem, just a small glitch in the Yii instruction (not mine).

Sandy