|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76919 REMOTE_ADDR in square brackets
Submitted: 2018-09-23 08:47 UTC Modified: 2019-03-12 08:59 UTC
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: a dot schilder at gmx dot de Assigned:
Status: Duplicate Package: Built-in web server
PHP Version: 7.3.0RC1 OS: Windows 10
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: a dot schilder at gmx dot de
New email:
PHP Version: OS:


 [2018-09-23 08:47 UTC] a dot schilder at gmx dot de
One of my scripts failed because the built-in web server returned the IPv6 value in $_SERVER['REMOTE_ADDR'] with square brackets.

The value was '[::1]' (PHP 7.3RC1) instead of '::1' (PHP 7.2.4), although it is no used as a host here (see RFC 3986, 3.2.2).

BTW: Also filter_var('[::1]', FILTER_VALIDATE_IP) fails (as expected).

Test script:

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-09-23 10:01 UTC]
-Status: Open +Status: Verified
 [2018-09-23 10:01 UTC]
That seems to be an unintended side effect of fixing bug #76136.
 [2019-03-12 08:59 UTC]
-Status: Verified +Status: Duplicate
 [2019-03-12 08:59 UTC]
Same issue as bug #77722, which is now fixed.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon Dec 05 08:05:54 2022 UTC