[php-src] Issue #8493: Warning message when using file_get_contents on hosts with HTTPS
| From: | batata004 | Date: | Wed, 04 May 2022 19:10:27 +0000 |
| Subject: | [php-src] Issue #8493: Warning message when using file_get_contents on hosts with HTTPS | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-241410@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8493
Author: batata004
### Description
This bug started happening in the last 30 days when I installed a fresh CentOS with PHP 8.1 and
tried to execute the code below. The bug happens with most hosts that use HTTPS (not just in the
particular host I showed below):
file_get_contents("https://www.sitepor500.com.br");
The warning I get is this:
Warning</b>: file_get_contents(): SSL operation failed with code 1. OpenSSL Error
messages: error:0A000126:SSL routines::unexpected eof while reading in
<b>/ebs1/apache/www/html
I use PHP for at least 10 years and this is the first time I encounter this error message. I googled
it and found some people that managed to find workaround on Ubuntu (not on Centos which I am using)
but I think a workaround is not a good solution and so I decided to report this bug here.
A final note: despite file_get_contents showing the warning, it fetchs the content of
the URL perfectly, no problem there.
### PHP Version
8.1.any
### Operating System
Centos 8 Stream