Sundar Sundar - 4 months ago 93
PHP Question

Could not open input file: composer.phar

I am trying to install zendframework using composer tool in wamp server.

The following steps are done towards installation


  1. I downloaded the Composer-Setup.exe file from composer page and got successfully installed.

  2. I downloaded the zendframework and extracted inside the
    c:\wamp\www\zend
    folder

  3. I executed the command for self update

    php composer.phar self-update



This line generates the error message:
could not open file composer.phar


how to resolve this error

If I try the

composer.phar self-update


enter image description here

Answer

The composer.phar install is notworking but without .phar this is working

We need to enable the openssl module in php before installing the zendframe work

We have to un-comment 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-\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

enter image description here