|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80102 stream_socket_client can't connect
Submitted: 2020-09-14 11:48 UTC Modified: 2020-09-14 12:55 UTC
From: contact at laurent-aubertin dot com Assigned: cmb (profile)
Status: Duplicate Package: Sockets related
PHP Version: 7.4.10 OS: ubuntu
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: contact at laurent-aubertin dot com
New email:
PHP Version: OS:


 [2020-09-14 11:48 UTC] contact at laurent-aubertin dot com
error : Warning: stream_socket_client(): unable to connect to tcp:// (Failed to parse address "null")

this connection work fine in PHP 7.4.9

No change in my code, just upgrade from 7.4.9 to 7.4.10


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-09-14 11:50 UTC]
-Status: Open +Status: Feedback
 [2020-09-14 11:50 UTC]
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

> var_dump(stream_socket_client('tcp://'));

this works fine for me - does this single line fail for you as well?
 [2020-09-14 12:28 UTC] contact at laurent-aubertin dot com
The error comes from a bad value in the context parameter.
Migration to PHP 7.4.10 created this bad value.
The problem is not in stream_socket_client but elsewhere. I continue to search for the source of the problem.
Sorry for this false alert on this feature. The ticket can be closed.
 [2020-09-14 12:55 UTC]
-Status: Feedback +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2020-09-14 12:55 UTC]
That's a duplicate of bug #80067, which has already been fixed; the fix will be contained in PHP 7.4.11.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 15 05:01:29 2024 UTC