DMarby / picsum-photos

Lorem Ipsum... but for photos.
https://picsum.photos
MIT License
2.22k stars 153 forks source link

OpenSSL SSL_connect: Connection reset by peer in connection to fastly.picsum.photos #106

Closed zotarelli closed 1 year ago

zotarelli commented 1 year ago

Hello @DMarby I write here recommended by @smknstd, I use his package (https://github.com/smknstd/fakerphp-picsum-images) I have an unexpected error, of 100 images download only 67, and other 33 are not downloaded. I had no what's happening clue until I write some code inside his FakerPicsumImagesProvider.php

if ($httpReturnCode != 200) {
    throw new \RuntimeException('Url: ' . $url . ' Code Error httpReturnCode: '. $httpReturnCode . ' '. curl_error($ch) . ' ' . curl_errno($ch));
}

Here I have this error

 RuntimeException 

Url: https://picsum.photos/900/300?random=11797 Code Error httpReturnCode: 302 OpenSSL SSL_connect: Connection reset by peer in connection to fastly.picsum.photos:443  35

Can you help me with this error? I undertand that initial with baseUrl = "https://picsum.photos/" and then with curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl can follow the header Location, with recursivity. But I don't know how to resolve this issue. In the browser fastly.picsum.photos is page not found.

Thanks in advance!

zotarelli commented 1 year ago

Hello @DMarby I figured out what happens. After ruling out that my version of curl is up to date and your site have the ssl certificate up to date too, I tryed to use other connection to internet to discard a firewall. And that its! I called to my ISP to see if they can fixed my issue, I'm waiting for a response yet.

Thanks and I'm sorry for the confusion!

zotarelli commented 1 year ago

I close this issue.