Skip to content

403 Reading File That We Have Been Reading for Years #11615

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
oleibman opened this issue Sep 23, 2024 · 5 comments
Closed

403 Reading File That We Have Been Reading for Years #11615

oleibman opened this issue Sep 23, 2024 · 5 comments

Comments

@oleibman
Copy link

oleibman commented Sep 23, 2024

Details

Expected Result

We have an Excel spreadsheet that points to an image
https://phpspreadsheet.readthedocs.io/en/latest/topics/images/01-03-filter-icon-1.png
Excel opens this file, including the image correctly. Until today, PhpSpreadsheet did as well (by using file_get_contents on the URL). Today, we get error 403 - Failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden. We also get such an error using stable or master instead of latest. Can you tell us what happened to cause this problem?

Expect result = read file contents.

Actual Result

Error 403.

@humitos
Copy link
Member

humitos commented Sep 24, 2024

The image you linked loads correctly to me.

@oleibman
Copy link
Author

Yes, it loads correctly in a browser, and in Excel. But the following command gets a 403:

php -r "file_get_contents('https://phpspreadsheet.readthedocs.io/en/latest/topics/images/01-03-filter-icon-1.png');"

This had worked correctly till yesterday. The Php release is unchanged.

@humitos
Copy link
Member

humitos commented Sep 24, 2024

Ah OK. Unfortunately, I can't help you with PHP. You will need to debug this more deeply to understand what's going on behind the scenes. If there is an issue with that URL we can fix it, but you will need to isolate the problem outside PHP.

@oleibman
Copy link
Author

Thank you for the suggestion. I have raised the issue with Php (see linked issue above), and they have a suggestion which seems to work. I am waiting for more details, but you appear to be off the hook.

@oleibman
Copy link
Author

I am still befuddled by what changed, but don't see a reason to keep the issue open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants