Home >Development Tools >composer >Composer installation and solving problems encountered
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!
## Class library search website: https://packagist. org/Composer Chinese website: https://www.phpcomposer.com/
Install Composer
在这之前,先检查你的php版本和相关扩展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.
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-opensslSolution: 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!