[GH-ISSUE #32] SSL EOF Error in Curl? #25

Closed
opened 2026-02-26 17:32:10 +03:00 by kerem · 1 comment
Owner

Originally created by @noxomix on GitHub (Mar 7, 2024).
Original GitHub issue: https://github.com/Corsinvest/cv4pve-api-php/issues/32

What happened?

Hello,

Some Bug, when I use the Laravel Php artisan development server the client works just fine, but when Im using the Queue Worker - which should make the same, it always failes with this error:

OpenSSL SSL_read: error:0A000126:SSL routines::unexpected eof while reading, errno 0

According to some sources and issues this is a well known issue in Php 8, but Im wondering how I can fix it.
It seems to usually appear in file_get_contents(https) but somehow also with cURL. But your client isnt using any of those, I tried to change those lines:

curl_setopt($prox_ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($prox_ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($prox_ch, CURLOPT_SSLVERSION, 7);

But even If im choosing the manual ssl version and skip openSSL 3 (i guess) the error still occurs. Hm.

Expected behavior

No error

Relevant log output

The whole Debug:

object(Corsinvest\ProxmoxVE\Api\Result)#963 (8) {
  ["reasonPhrase":"Corsinvest\ProxmoxVE\Api\Result":private]=>
  string(84) "OpenSSL SSL_read: error:0A000126:SSL routines::unexpected eof while reading, errno 0"
  ["statusCode":"Corsinvest\ProxmoxVE\Api\Result":private]=>
  int(401)
  ["response":"Corsinvest\ProxmoxVE\Api\Result":private]=>
  NULL
  ["resultIsObject":"Corsinvest\ProxmoxVE\Api\Result":private]=>
  bool(true)
  ["requestResource":"Corsinvest\ProxmoxVE\Api\Result":private]=>
  string(35) "/nodes/noxomix/lxc/401/status/start"
  ["requestParameters":"Corsinvest\ProxmoxVE\Api\Result":private]=>
  array(0) {
  }
  ["methodType":"Corsinvest\ProxmoxVE\Api\Result":private]=>
  string(6) "CREATE"
  ["responseType":"Corsinvest\ProxmoxVE\Api\Result":private]=>
  string(4) "json"
}


### PHP Version

8.1, 8.2, 8.3 - no others tested

### Proxmox VE Version

8

### Version (bug)

latest

### Version (working)

_No response_

### On what operating system are you experiencing the issue?

Linux

### Pull Request

- [ ] I would like to do a Pull Request
Originally created by @noxomix on GitHub (Mar 7, 2024). Original GitHub issue: https://github.com/Corsinvest/cv4pve-api-php/issues/32 ### What happened? Hello, Some Bug, when I use the Laravel Php artisan development server the client works just fine, but when Im using the Queue Worker - which should make the same, it always failes with this error: ``` OpenSSL SSL_read: error:0A000126:SSL routines::unexpected eof while reading, errno 0 ``` According to some sources and issues this is a well known issue in Php 8, but Im wondering how I can fix it. It seems to usually appear in file_get_contents(https) but somehow also with cURL. But your client isnt using any of those, I tried to change those lines: ```php curl_setopt($prox_ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($prox_ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($prox_ch, CURLOPT_SSLVERSION, 7); ``` But even If im choosing the manual ssl version and skip openSSL 3 (i guess) the error still occurs. Hm. ### Expected behavior No error ### Relevant log output ```shell The whole Debug: object(Corsinvest\ProxmoxVE\Api\Result)#963 (8) { ["reasonPhrase":"Corsinvest\ProxmoxVE\Api\Result":private]=> string(84) "OpenSSL SSL_read: error:0A000126:SSL routines::unexpected eof while reading, errno 0" ["statusCode":"Corsinvest\ProxmoxVE\Api\Result":private]=> int(401) ["response":"Corsinvest\ProxmoxVE\Api\Result":private]=> NULL ["resultIsObject":"Corsinvest\ProxmoxVE\Api\Result":private]=> bool(true) ["requestResource":"Corsinvest\ProxmoxVE\Api\Result":private]=> string(35) "/nodes/noxomix/lxc/401/status/start" ["requestParameters":"Corsinvest\ProxmoxVE\Api\Result":private]=> array(0) { } ["methodType":"Corsinvest\ProxmoxVE\Api\Result":private]=> string(6) "CREATE" ["responseType":"Corsinvest\ProxmoxVE\Api\Result":private]=> string(4) "json" } ``` ``` ### PHP Version 8.1, 8.2, 8.3 - no others tested ### Proxmox VE Version 8 ### Version (bug) latest ### Version (working) _No response_ ### On what operating system are you experiencing the issue? Linux ### Pull Request - [ ] I would like to do a Pull Request
kerem 2026-02-26 17:32:10 +03:00
Author
Owner

@noxomix commented on GitHub (Mar 7, 2024):

Okay I figured out it has something todo with Ubuntu 22 and PHP curl - OpenSSL bindings , the only workaround would be recompiling PHP. So nothing todo with you library

Edit: It has something todo with Curl , just recompile Curl on your Ubuntu 22 machine from 7.81 to 7.88 - then everything will work!

<!-- gh-comment-id:1984615392 --> @noxomix commented on GitHub (Mar 7, 2024): Okay I figured out it has something todo with Ubuntu 22 and PHP curl - OpenSSL bindings , the only workaround would be recompiling PHP. So nothing todo with you library Edit: It has something todo with Curl , just recompile Curl on your Ubuntu 22 machine from 7.81 to 7.88 - then everything will work!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cv4pve-api-php#25
No description provided.