|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70252 Missing AF_INET6 constant
Submitted: 2015-08-12 19:05 UTC Modified: 2015-08-13 08:22 UTC
From: alec at alec dot pl Assigned: cmb (profile)
Status: Not a bug Package: *Network Functions
PHP Version: 7.0.0beta3 OS: Linux
Private report: No CVE-ID: None
 [2015-08-12 19:05 UTC] alec at alec dot pl
I always used this constant to detect if PHP is compiled with IPv6 support. On PHP7 which via phpinfo() says it has enabled IPv6 support defined('AF_INET6') returns false.

I use packages from

Test script:
echo (int) defined('AF_INET6');

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-08-12 20:23 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2015-08-12 20:23 UTC]
AF_INET6 is defined in the sockets extension, so check whether
it's loaded in the PHP info or by calling
 [2015-08-13 07:36 UTC] alec at alec dot pl
-Status: Feedback +Status: Closed
 [2015-08-13 07:36 UTC] alec at alec dot pl
Indeed. There's no sockets extension in this installation. Sorry for that.
 [2015-08-13 08:22 UTC]
-Status: Closed +Status: Not a bug
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Apr 20 05:01:24 2021 UTC