Problem: Yii cant create webapp

Hi, sorry my english first, i use Win 8

Donloaded Yii, my server is xampp and works fine, after install yii at C:Xampp/htdocs under the name of "yii", went to cmd to create a webapp… by writing

cd C:\xampp\htdocs\yii\framework

That works fine, it retrieves this same line:

C:\xampp\htdocs\yii\framework

then i write:

[color="#FF0000"]yiic webapp …\testdrive

then: Nothing, it gives me an error message: system cant find specific route[/color]

I already try everything, changed \ to / changed that line for many others i found on internet for similar problem reports, i already checked my control panel "path" and added the php route, every option i could find on internet… still cant create an app, please help!

Thanks

Hi!

What version of the Yii you used? :) If you want to install a Yii2 (see the forum title:) ) please use easy instruction below:

Install Yii2 via Composer

This is the preferred way of installing Yii 2.0. If you do not have Composer yet, you may install it by following the instructions here.

After installing Composer, run the following command to install the Composer Asset Plugin:

php composer.phar global require "fxp/composer-asset-plugin:1.0.0"

Now choose one of the application templates to start installing Yii 2.0. An application template is a package that contains a skeleton Web application written in Yii.

To install the basic application template, run the command below:


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

To install the advanced application template, run the command below:


php composer.phar create-project yiisoft/yii2-app-advanced advanced 2.0.4

Note that you may be prompted to enter your GitHub username and password during the installation process. This is normal. Just enter them and continue.

http://www.yiiframework.com/download/

Hi, thanks for reply, i´m new to Yii, trying to learn…but haven´t passed the instalation process aparently, lol

I downloaded Yii 2.0

I dont have a Github account, i dont think its free, is that just for the advanced version?

where do you run that comand, in cmd? or in that composer pluggin?

Thanks

Please, fellow an instruction below:

  1. Install the Composer (https://getcomposer.org/)

  2. Install apache/php/mysql/git…

  3. If you’re using a Windows, add a php, git and composer in your PATH config

  4. Create a GitHub account (https://github.com/join)

  5. In your prefer terminal (I’m in love with ConEmu for Windows)

  6. Make a virtual host in Apache (Nginx? it’s your own choice)

  7. In terminal change a working folder to folder where your site may be located

  8. Type in terminal step-by-step:


php composer.phar global require "fxp/composer-asset-plugin:1.0.0"

for basic app template (without backend(admin area)):


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


php composer.phar update

  1. Testing :)

Huh! Manual - http://www.yiiframework.com/doc-2.0/guide-start-installation.html

Just to clarify:

  • Github account isn’t required. (EDIT: see here) You can install and use the framework and any application template or extension without one.

  • You don’t have to use Git as your VCS.

  • Git client must be installed on your development system because it’s required by some features of Composer (like create-project).

It’s not quite a true.

  • When I was installing a Yii2 via Composer it asked me GitHub Auth Key, in other cases it asked GitHub login/password;

  • Git is neccessary part of Yii development and Composer features.

Never happened to me so I did some research:

  • Yii (or any other package hosted on Gihub) can be installed via Composer without a Github account. My colleague who has no Github account did it successfully several times.

  • When installing/updating multiple dependencies Composer may exceed the rate limit of Github API for anonymous users (60 requests/hour). In that case it will promt you for your Github creditentals.

So it seems like having a Github account - while not strictly required - is strongly recommended.

Git client is required by Composer but Git has nothing to do with Yii application development. You can use any VCS you prefer or no VCS at all.

I am at the same stage as the original poster, just making the move from Yii 1 to Yii 2. I managed to get the basic application going following the installation guide, but I’m still perplexed about what Composer is. Is it involved in anything other than creating a project?

Hi there! :)

Composer is not only for install Yii first time.

Composer - it’s a convenient packages manager. It is means you should not download fresh version of projects packages from the different web resources, and you will be sure that all who use you project in they own environmental has exactly set of packages (and their version) as yours.

A think, what I’m trying to bring to you is - you should use composer to:

  1. SetUp Yii

  2. Download and install extensions to the your project (or globally)

  3. Update all extensions just typing ‘composer update’ in you console.

or do these steps manually.

See more on https://getcomposer.org/