The only thing I remember doing different was canceling a composer update command before it started updating any dependencies.
I get this error if I try composer self-update:
[Composer\Downloader\TransportException]
The "https://getcomposer.org/versions" file could not be downloaded:
php_network_getaddresses: getaddrinfo failed: Name or service not known
failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or
service not known
I'm guessing it's an issue with composer itself.
EDIT: composer diag fails on 3 things: http connectivity to packagist, github.com oauth access, and checking composer version.
I restarted the computer and it fixed it...The app is running on a Docker container so maybe just restarting the container itself would have helped, but I wanted to go all the way.
Related
After Laravel released new version (5.7) of this framework, i cant create new project and its commands not work
i did this works:
1) use laravel new MyProject with this error :
[GuzzleHttp\Exception\RequestException] Error creating resource: [message]
fopen(http://cabinet.laravel.com/latest.zip): failed to open stream: A
connection attempt failed because the connected party did not properly
respond after a period of time, or established connection failed because
connected host has failed to respond.[file]
C:\Users\Saeid\AppData\Roaming\Composer\vendor\guzzlehttp\guzzle\src\
Handler\StreamHandler.php[line] 324
2) use composer create-project --prefer-dist laravel/laravel MyProject with this error :
[Composer\Downloader\TransportException] The "https://repo.packagist.org/packages.json" file could not be downloaded: failed to open stream: No connection could be made because the target machine actively refused it.
3) update composer by composer selfupdate with this error :
[Composer\Downloader\TransportException] The "https://getcomposer.org/versions" file could not be downloaded: failed to open stream: No connection could be made because the target machine actively refused it.
4) update laravel instller by composer global require "laravel/installer"
[Composer\Downloader\TransportException] The "https://repo.packagist.org/packages.json" file could not be downloaded: failed to open stream: No connection could be made because the target machine actively refused it.
Notice: in all of steps all links work on google chrome!!!! but it said "No connection could be made because the target machine actively refused it."
Notice: my composer version (1.7.2)
Notice: my Laravel installer version is (2.0.1)
Finally I found the problem ...
that's "Composer Proxy Setting"
because damned Filtering in Iran we must use proxy based programs for bypass the filtering.
last time i installed the composer the proxy based anti filter app (freegate) was running and composer get the local proxy address "127.0.0.1:8580" and all of the problems started...
today when the freegate was running i saw everything is OK!!!
some body know how to change the composer proxy setting???
i removed the composer and install it again but the installer automatically use this proxy address and disable the checkbox that use to select the proxy setting.
that means i cant disable proxy setting or change it.... :(
first download the composer the open your IDE the execute composer create-project "laravel/laravel" project-name
I have a problem with composer.
when I want install a php package with composer on my project, I see this mess :
You are running Composer with SSL/TLS protection disabled.
[Composer\Downloader\TransportException]
The "https://packagist.org/packages.json" file could not be
downloaded: fai led to open stream: Connection refused
please help me ...
how can i ok this problem ?
Thanks in advance
While I want to user Laravel 5 with PHP after installing XAMPP server I downloading composer from its website and while installing composer file in last step it is giving the error:
The "https://getcomposer.org/versions" file could not be downloaded: failed to open stream: No connection could be made because the target machine actively refused it."
I was trying to install Laravel at work and I could not do it, I know there might be a proxy problem because there some restrictions but I am not sure, this is the error message I get when I run the install on terminal
I run this command
composer create-project --prefer-dist laravel/laravel testproject
and I got this error message
The "https://packagist.org/packages.json" file could not be downloaded: failed to open stream: Operation timed out
Retrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info
[Composer\Downloader\TransportException]
The "https://packagist.org/packages.json" file could not be downloaded: failed to open stream: No route to host
any ideas?
thanks
I found the slution!
is by adding the proxy at the beginning of the command like this
HTTP_PROXY="http;//yourproxy.something" composer create-project
--prefer-dist laravel/laravel testproject
est voila, it works :D
I am trying to install SF2 2.7 version and when I follow the steps here to install Symfony Installer:
php -r "readfile('http://symfony.com/installer');" > symfony
It does not install SF2 and gives the errors:
G:\>symfony new alfa
'symfony' is not recognized as an internal or external command,
operable program or batch file.
When I try this command:
G:\>php symfony
Warning: readfile(): php_network_getaddresses: getaddrinfo failed: This is
usually a temporary error during hostname resolution and means that the
local server did not receive a response from an authoritative server. in
Command line code on line 1
Warning: readfile(http://symfony.com/installer): failed to open stream:
php_network_getaddresses: getaddrinfo failed: This is usually a temporary
error during hostname resolution and means that the local server did not
receive a response from an authoritative server. in Command line code on
line 1
I could not find any help on Symfony website about alternative installation method.
Found the solution. The problem was with PHP Version (was using old Xampp).
After running the command:
php -r "readfile('http://symfony.com/installer');" > symfony
I have to run the symfony application like:
php symfony
It works perfectly now. Thanks all for the support.