Skip to content

NativeHttpClient thows Invalid IP Address: 0 on PHP 8.1 #41622

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
Tracked by #41552
derrabus opened this issue Jun 8, 2021 · 2 comments
Closed
Tracked by #41552

NativeHttpClient thows Invalid IP Address: 0 on PHP 8.1 #41622

derrabus opened this issue Jun 8, 2021 · 2 comments

Comments

@derrabus
Copy link
Member

derrabus commented Jun 8, 2021

Blocks #41552

Symfony version(s) affected: 4.4-dev

Description
Making a request with NativeHttpClient on PHP 8.1 will yield a TransportException with the following error message:

fopen(): Invalid IP Address: 0

When I switch to CurlHttpClient, the error is gone.

How to reproduce

$client = new NativeHttpClient();
$client->request('GET', 'https://www.symfony.com')->getInfo();
@nicolas-grekas
Copy link
Member

Related to #38086

@derrabus
Copy link
Member Author

derrabus commented Jun 8, 2021

Indeed. #41624

derrabus added a commit that referenced this issue Jun 8, 2021
…ersions (derrabus)

This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] Revert bindto workaround for unaffected PHP versions

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #41622
| License       | MIT
| Doc PR        | N/A

This PR reverts the changes of #38086 for PHP versions that don't need that workaround.

Commits
-------

e9afce3 [HttpClient] Revert bindto workaround
@derrabus derrabus closed this as completed Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants