1

Laravel 9 App, running well with docker desktop on Windows 10 - WSL2 Ubuntu. Here is my load function code in controller responsible for import xml file:

public function load($fileName)
    {
        $filePath = 'https://___.xml';
        $xmlString = file_get_contents($filePath);
        $xmlObject = simplexml_load_string($xmlString);

        $json = json_encode($xmlObject);
        $phpArray = json_decode($json, true);

        dd($phpArray);
    }

Im getting such error:

file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:0A000126:SSL routines::unexpected eof while reading

How can I handle this?

Arek TG
  • 190
  • 1
  • 1
  • 9
  • https://stackoverflow.com/questions/26148701/file-get-contents-ssl-operation-failed-with-code-1-failed-to-enable-crypto – Marshall C Jul 20 '22 at 00:05
  • Reading more into this, it appears to be a bug. https://stackoverflow.com/questions/72536921/file-get-contents-ssl-operation-failed-with-code-1-openssl-error-messages-e – Marshall C Jul 20 '22 at 00:13

0 Answers0