Home > Development Tools > composer > Composer installation and solving problems encountered

Composer installation and solving problems encountered

藏色散人
Release: 2021-01-04 15:01:49
forward
1974 people have browsed it

The following column of composer tutorial will introduce you to Composer installation and solving problems encountered. I hope it will be helpful to friends who need it. Helped!

Composer installation and solving problems encountered

## Class library search website: https://packagist. org/

Composer Chinese website: https://www.phpcomposer.com/

Install Composer

在这之前,先检查你的php版本和相关扩展
Copy after login
1.php> =5.6

2. Whether the OpenSSL extension is configured properly
3. Composer installation package and the certificate download address required for OpenSSL
4. After the download is completed, open the installation program and follow the steps.
5. When selecting the path in the middle, select the php.exe file of the PHP version you want to use
6. If you encounter problems during the installation and the download fails, just try a few more times.

If your OpenSSL extension is not configured, the following error may occur:


Some settings on your machine make Composer unable to work properly.  Make sure that you fix the issues listed below and run this script again:
The openssl extension is missing, which means that secure HTTPS transfers are impossible.  If possible you should enable it or recompile php with –with-openssl
Copy after login

Solution:

1. For example, in the php installation directory In D:\wamp\bin\php\php5.6\, find the php.ini file in a directory, and then remove the comment at the beginning of the extension=php_openssl.dll line. Note: Because SSL connections require authentication, you need to prepare the CA certificate before continuing with the following steps (it is recommended to save the certificate in the relevant directory of php), which can be obtained from https://curl.haxx.se/docs/caextract.html download. You can also download it from step 3 above.

2. Modify openssl.cafile in the php.ini file. Create an ssl folder in the php folder, put the certificate in it, modify the php.ini file, openssl.cafile="D:\phpStudy\php\ssl\cacert.pem", and finally restart the php environment, it should be It can be installed.

The above is the detailed content of Composer installation and solving problems encountered. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template