Home  >  Article  >  Development Tools  >  What to do if composer windows installation fails

What to do if composer windows installation fails

藏色散人
藏色散人Original
2019-08-24 11:09:438432browse

What to do if composer windows installation fails

What should I do if the composer windows installation fails?

Solution to composer installation failure under windows:

1 Open the openssl extension of php

Can be found in Open the openssl extension directly in the wamp manager. You can also use the php command to open the extension. You can also open the extension by modifying php.ini and restarting it.

The following is an example of the command to open the extension:

You can use the following command line to determine the php.ini file path used by php on the command line:

php –ini

Then Use the following command to determine whether the php_openssl.dll extension is opened:

php -i | findstr /I /N “openssl”

If the output string contains openssl information, it means that openssl is opened successfully; otherwise, please change the php.ini file and open the php_openssl.dll extension.

2 Download the installer file, open the link through the browser: getcomposer.org/installer, download the following file to d:\software\composer, the file name is composer_installer.phar

3 Enter the command to install composer:

php composer_installer.phar

Installation success interface

If the installation is successful, run php composer.phar -v View the version information of composer

For more technical articles on using composer, please visit the composer usage tutorial column!

The above is the detailed content of What to do if composer windows installation fails. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn