-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed as not planned
Closed as not planned
Copy link
Description
Description
The following code:
php -r "file_get_contents('https://phpspreadsheet.readthedocs.io/en/latest/topics/images/01-03-filter-icon-1.png');"
The command above is issued on the command line, but the same result will happen within a program.
Resulted in this output:
Warning: file_get_contents(https://phpspreadsheet.readthedocs.io/en/latest/topics/images/01-03-filter-icon-1.png): Failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden
in Command line code on line 1
Call Stack:
0.0007 473600 1. {main}() Command line code:0
0.0013 473632 2. file_get_contents($filename = 'https://phpspreadsheet.readthedocs.io/en/latest/topics/images/01-03-filter-icon-1.png') Command line code:1
But I expected this output instead:
// no warning/error message
We have been using this code for years. It works with latest versions of Php8.0 (8.0.30) and Php8.1 (8.1.28), but not 8.2 (8.2.18) nor 8.3 (8.3.6) (problem showed up yesterday for the first time, I had not applied any Php maintenance since its last successful run). I raised an issue with readthedocs (readthedocs/readthedocs.org#11615), but they think it is a problem with Php, not with their server. We have set allow_url_fopen to true in php.ini in all of 8.0/8.1/8.2/8.3.
PHP Version
PHP 8.2.18, PHP 8.3.6
Operating System
Windows, Ubuntu