Could not open input file: composer.phar
I was trying to install YII 2.0
php composer.phar create-project yiisoft/yii2-app-advanced advanced 2.0.0-alpha
I got the same error:
Could not open input file: composer.phar
Then i gave the full path of .phar like this:
php C:\ProgramData\Composer\bin\composer.phar create-project yiisoft/yii2-app-advanced advanced 2.0.0-alpha
and it worked.
Use this :
php -r "readfile('https://getcomposer.org/installer');" | php
This will install composer to the current directory so that you can use php composer.phar
The composer.phar install is not working but without .phar this is working.
We need to enable the openssl module in php before installing the zendframe work.
We have to uncomment the line ;extension=php_openssl.dll from php.ini
file.
composer use different php.ini file which is located at the wamp\bin\php\php-<version number>\php.ini
After enabling the openssl we need to restart the server.
The execute the following comments.
I can install successfully using these commands -
composer self-update
composer install --prefer-dist