Win10 installing composer with Composer-setup and using composer to install YII2 latest version

Source: Internet
Author: User
Tags autoload deprecated diff intl yii

1: Download Ca-bundle.crt and CACERT.PEM (see Navigation Bar--file)

Put these two files in the PHP directory

Add the path to the above two files in the 2:php.ini

Curl.cainfo=c:/xampp/php/ca-bundle.crt
Openssl.cafile=c:/xampp/php/ca-bundle.crt

Write to the last line and you can

3: Download Composer-setup.exe

https://getcomposer.org/download/

Locate Composer-setup.exe on this page and download the installation (required to VPNFQ)

4: Install if an error occurs

notice:undefined variable: cabundle in-on line 892

When this error occurs, locate the error path to open the install file and find 892 rows

The red line of the local newspaper Cabundle undefined, manually changed to the following:

Save the file after the change, and exit Composer-setup.exe (do not continue to install), and then reinstall, no error, go through the installation process

5: Verify the installation results:

6: Install Yii2

Set up access directory YII2 on the server,

Create a token on GitHub's personal information, and copy it when prompted for token (hidden) when creating a project.

Reference

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

Install the latest version of Yii2,

Note the following two lines are created to create the command

PHP Composer.phar global require "fxp/composer-asset-plugin:~1.1.1"
PHP composer.phar create-project yiisoft/yii2-app-basic Basic 2.0.6
Switch
Composer global require "fxp/composer-asset-plugin:~1.1.1"
Composer Create-project Yiisoft/yii2-app-basic Basic 2.0.6
If this is an advanced project:
Composer Create-project Yiisoft/yii2-app-advanced Advanced 2.0.6

Then wait for the installation, and CMD displays as follows:

Microsoft Windows [version 10.0.10240] (c) is Microsoft Corporation. All rights reserved.

C:\USERS\JZZQ>CD C:\xampp\htdocs\yii2

c:\xampp\htdocs\yii2>php Composer.phar global require "fxp/composer-asset-plugin:~1.1.1" Could not open input file: Composer.phar

C:\xampp\htdocs\yii2>composer self-update You is already using composer version 03299ff075236be27be356498d6c64def973fe41.

c:\xampp\htdocs\yii2>php Composer.phar global require "fxp/composer-asset-plugin:~1.1.1" Could not open input file: Composer.phar

C:\xampp\htdocs\yii2>composer global require "fxp/composer-asset-plugin:~1.1.1" Changed current directory to c:/ Users/jzzq/appdata/roaming/composer deprecation notice:the Composer\package\linkconstraint\multiconstraint class is Deprecated, use composer\semver\constraint\multiconstraint instead. In phar://c:/programdata/composersetup/bin/composer.phar/src/composer/package/linkconstraint/ Multiconstraint.php:17 deprecation Notice:the Composer\package\linkconstraint\linkconstraintinterface interface is Deprecated, use composer\semver\constraint\constraintinterface instead. In phar://c:/programdata/composersetup/bin/composer.phar/src/composer/package/linkconstraint/ Linkconstraintinterface.php:17./composer.json have been updated Loading composer repositories with package information up Dating dependencies (including Require-dev)  -removing fxp/composer-asset-plugin (v1.0.3)  -Installing FXP/C Omposer-asset-plugin (v1.1.1)     downloading:100%

Writing lock file generating autoload files

c:\xampp\htdocs\yii2>php composer.phar create-project yiisoft/yii2-app-basic basic 2.0.6 Could not open input File:co Mposer.phar

C:\xampp\htdocs\yii2>composer create-project yiisoft/yii2-app-basic Basic 2.0.6 installing Yiisoft/yii2-app-basic (2.0.6)-Installing Yiisoft/yii2-app-basic (2.0.6) Loading from cache

Created project in basic Loading composer repositories with package information installing dependencies (including require -dev)-Installing Yiisoft/yii2-composer (2.0.3) Loading from cache

-Installing Ezyang/htmlpurifier (v4.6.0) Loading from cache

-Installing Bower-asset/jquery (2.1.4) Loading from cache

-Installing Bower-asset/yii2-pjax (v2.0.5) Loading from cache

-Installing Bower-asset/punycode (v1.3.2) Loading from cache

-Installing Bower-asset/jquery.inputmask (3.1.63) Loading from cache

-Installing Cebe/markdown (1.1.0) Loading from cache

-Installing YIISOFT/YII2 (2.0.6) Loading from cache

-Installing Swiftmailer/swiftmailer (v5.4.1) Loading from cache

-Installing Yiisoft/yii2-swiftmailer (2.0.4) Loading from cache

-Installing Yiisoft/yii2-codeception (2.0.4) Loading from cache

-Installing Bower-asset/bootstrap (v3.3.5) Loading from cache

-Installing Yiisoft/yii2-bootstrap (2.0.5) Loading from cache

-Installing Yiisoft/yii2-debug (2.0.5) Loading from cache

-Installing Bower-asset/typeahead.js (v0.10.5) Loading from cache

-Installing Phpspec/php-diff (v1.0.2) Loading from cache

-Installing Yiisoft/yii2-gii (2.0.4) Loading from cache

-Installing Fzaninotto/faker (v1.5.0) Loading from cache

-Installing Yiisoft/yii2-faker (2.0.3) Loading from cache

Fzaninotto/faker suggests installing ext-intl (*) Writing lock file generating autoload files > Yii\composer\installer: :p ostcreateproject chmod (' Runtime ', 0777) ... done. chmod (' Web/assets ', 0777) ... done. chmod (' Yii ', 0755) ... done.

C:\xampp\htdocs\yii2>composer create-project yiisoft/yii2-app-advanced Advanced 2.0.6 Installing yiisoft/ yii2-app-advanced (2.0.6)-Installing yiisoft/yii2-app-advanced (2.0.6) downloading:100%

Created Project in advanced Loading Composer repositories with package information installing dependencies (including requ Ire-dev)-Installing Yiisoft/yii2-composer (2.0.3) Loading from cache

-Installing Ezyang/htmlpurifier (v4.6.0) Loading from cache

-Installing Cebe/markdown (1.1.0) Loading from cache

-Installing Bower-asset/jquery (2.1.4) Loading from cache

-Installing Bower-asset/jquery.inputmask (3.1.63) Loading from cache

-Installing Bower-asset/punycode (v1.3.2) Loading from cache

-Installing Bower-asset/yii2-pjax (v2.0.5) Loading from cache

-Installing YIISOFT/YII2 (2.0.6) Loading from cache

-Installing Swiftmailer/swiftmailer (v5.4.1) Loading from cache

-Installing Yiisoft/yii2-swiftmailer (2.0.4) Loading from cache

-Installing Yiisoft/yii2-codeception (2.0.4) Loading from cache

-Installing Bower-asset/bootstrap (v3.3.5) Loading from cache

-Installing Yiisoft/yii2-bootstrap (2.0.5) Loading from cache

-Installing Yiisoft/yii2-debug (2.0.5) Loading from cache

-Installing Bower-asset/typeahead.js (v0.10.5) Loading from cache

-Installing Phpspec/php-diff (v1.0.2) Loading from cache

-Installing Yiisoft/yii2-gii (2.0.4) Loading from cache

-Installing Fzaninotto/faker (v1.5.0) Loading from cache

-Installing Yiisoft/yii2-faker (2.0.3) Loading from cache

Fzaninotto/faker suggests installing ext-intl (*) Writing lock file generating autoload files

C:\xampp\htdocs\yii2>

Win10 installing composer with Composer-setup and using composer to install YII2 latest version

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.