I have an Ubuntu 22.04 install and it is using OpenSSL 3. When I put my site on the server, I get this error:

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

Searching for answers just tells me there's a bug with PHP 8.1 and OpenSSL3 on a Laravel app. So, how is anybody hosing PHP apps on Ubuntu 22.04?

1 Answer 1


This seems to be fixed in the latest version of PHP. I had the same problem connecting to GitLab over https on PHP 8.1.2, but PHP 8.1.6 does not have the same problem.

PopOS 22.04 (based on Ubuntu) currently ships with 8.1.2, but running php:latest from docker hub brings 8.1.6 which solved my issue (running a script to backup git repos from our GitLab account)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .