PHP e não conectando com o Composer

0

Meu PC não consegue acessar determinados sites, como o site do compositor, com PHP e compositor. Para instalar o compositor eu tive que usar uma VPN que eu não gosto e, portanto, queria encontrar a correção. Eu instalei o XAMPP no meu laptop (separado deste PC) e a instalação do compositor funcionou e nenhum erro foi mostrado. Como posso consertar este PC para funcionar como o meu laptop?

curl -vvv result:

curl -vvv https://getcomposer.org/versions
* timeout on name lookup is not supported
*   Trying 2001:41d0:a:7b19::2...
* TCP_NODELAY set
* Connected to getcomposer.org (2001:41d0:a:7b19::2) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: C:/laragon/bin/git/mingw64/ssl/certs/ca-bundle.crt
  CApath: none
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* NPN, negotiated HTTP1.1
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Unknown (67):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server did not agree to a protocol
* Server certificate:
*  subject: C=DE; L=Berlin; O=Packagist Conductors UG (haftungsbeschränkt); CN=getcomposer.org
*  start date: Jul 12 00:00:00 2017 GMT
*  expire date: Aug 25 12:00:00 2020 GMT
*  subjectAltName: host "getcomposer.org" matched cert's "getcomposer.org"
*  issuer: C=US; O=DigiCert Inc; CN=DigiCert SHA2 Secure Server CA
*  SSL certificate verify ok.
> GET /versions HTTP/1.1
> Host: getcomposer.org
> User-Agent: curl/7.53.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: nginx
< Date: Tue, 25 Jul 2017 20:59:10 GMT
< Content-Type: application/json
< Content-Length: 317
< Last-Modified: Tue, 25 Jul 2017 20:55:08 GMT
< Connection: keep-alive
< ETag: "5977b02c-13d"
< Accept-Ranges: bytes
<
{
    "stable": [{"path": "/download/1.4.2/composer.phar", "version": "1.4.2", "min-php": 50300}],
    "preview": [{"path": "/download/1.4.2/composer.phar", "version": "1.4.2", "min-php": 50300}],
    "snapshot": [{"path": "/composer.phar", "version": "189ba423aedc387a0487df40afc2428947406327", "min-php": 50300}]
}
* Connection #0 to host getcomposer.org left intact

Às vezes, ele se conecta, na maioria das vezes não. Ele sempre funciona no meu laptop, mas não no meu PC.

    
por danteg 25.07.2017 / 23:35

1 resposta

0

deste tópico : você pode adicionar isso ao seu compositor.json { "repositories": [ { "packagist": false }, { "type": "composer", "url": "https://packagist.org/" } ] }

    
por 04.06.2018 / 09:53