php.net |  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
Description:
------------
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 https://launchpad.net/~ondrej/+archive/ubuntu/php-7.0.

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

Expected result:
----------------
1

Actual result:
--------------
0

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-08-12 20:23 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2015-08-12 20:23 UTC] cmb@php.net
AF_INET6 is defined in the sockets extension, so check whether
it's loaded in the PHP info or by calling
`extension_loaded("sockets"))`.
 [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] requinix@php.net
-Status: Closed +Status: Not a bug
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Jul 17 23:01:25 2019 UTC