I'm trying to run composer install in my project but I have the following error
[Composer\Downloader\TransportException]
The "http://packagist.org/p/provider-2013$43e3f41fbe30a46245103451248f688a727f076a6e90636d19a69a156c17a416.json" file could not be downloaded (HTTP/1.1 400 Received invalid request from Client)
I have tried to run composer self-update and have this error
[Composer\Downloader\TransportException]
The "https://getcomposer.org/version" file could not be downloaded: Failed to enable crypto failed to open stream: operation failed
I'm running Ubuntu 15.04 with apache/php5.6.4/mysql behind a proxy.
I have tried downloading http://curl.haxx.se/ca/cacert.pem and updated my php.ini file with the following
curl.cainfo=/etc/ssl/certs/cacert.pem
openssl.cafile=/etc/ssl/certs/cacert.pem
openssl.capath=/etc/ssl/certs
Running composer diagnose returns this
Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: FAIL
[Composer\Downloader\TransportException] The "http://packagist.org/packages.json" file could not be downloaded (HTTP/1.1 400 Received invalid request from Client)
Checking https connectivity to packagist: OK
Checking HTTP proxy: OK
Checking HTTP proxy support for request_fulluri: FAIL
Unable to assess the situation, maybe packagist.org is down (The "http://packagist.org/packages.json" file could not be downloaded (HTTP/1.1 400 Received invalid request from Client))
Checking HTTPS proxy support for request_fulluri: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking composer version: FAIL
You are not running the latest version
And finally openssl_get_cert_locations() returns
I'm at a total loss as to what's wrong and even more how I can debug this.
I hope there's someone out there can help me!
Try clearing Composer's cache by running composer clear-cache . Ensure you're installing vendors straight from your composer. json via rm -rf vendor && composer update -v when troubleshooting, excluding any possible interferences with existing vendor installations or composer.
This is the easiest way to get Composer set up on your machine. Download and run Composer-Setup.exe. It will install the latest Composer version and set up your PATH so that you can call composer from any directory in your command line. Note: Close your current terminal.
Step 1: Navigate to the official composer website. Step 2: Then click on the Download button. Step 3: Then click on the Composer-Setup.exe & download the file. Step 4: Then click on “Install for all users”.
Updating and Uninstalling Composer From there, you can verify Composer's installation by running --version command from the terminal. If the command returns the version code, it means the Composer is installed, and you are ready for the next steps.
same with you. and i found the way to resolve it (for window 10) on internet.
1 - go to folder
PATH\xampp\apache
and run makecert.bat
2 - add this script to composer.json file
"repositories": [
{
"type": "composer",
"url": "https://packagist.org"
},
{
"packagist": false
}
]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With