FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=17473&edit=1

ID: 17473
Updated by: daniel.oconnor@gmail.com
Reported By: hm2k at php dot net
Summary: undefined constant SOL_UDP
-Status: Open
+Status: Feedback
Type: Bug
Package: Net_DNS
Package Version: 1.0.1
PHP Version: 5.3.2
Roadmap Versions:
New Comment:

-Status: Open
+Status: Feedback
Alrighty, what does the below render (to ask a stupid question)?

<?php
var_dump(extension_loaded("sockets"));
echo SOL_UDP;


Previous Comments:
------------------------------------------------------------------------

[2010-06-09 21:59:33] hm2k

It must be enabled otherwise socket_create() wouldn't exist to return
that kind of error.

It doesn't occur all of the time and I'm unable to isolate a case at the
moment.

Perhaps it wouldn't harm to check if it's defined or not and then define
it if not.

------------------------------------------------------------------------

[2010-06-08 00:05:02] doconnor

That's really odd - SOL_UDP is part of the PHP socket extension.

http://theserverpages.com/php/manual/en/function.socket-create.php

Can you check your php.ini to ensure you've got it properly enabled?

------------------------------------------------------------------------

[2010-06-07 20:18:23] hm2k

Description:
------------
PHP Notice: Use of undefined constant SOL_UDP - assumed 'SOL_UDP' in
/usr/lib/php/Net/DNS/Resolver.php on line 950
PHP Warning: socket_create() expects parameter 3 to be long, string
given in /usr/lib/php/Net/DNS/Resolver.php on line 950


Test script:
---------------
I'm not 100% sure how to reproduce at this moment in time.

------------------------------------------------------------------------

Search Discussions

  • Hm2k at Aug 9, 2010 at 8:25 am
    Edit report at http://pear.php.net/bugs/bug.php?id=17473&edit=1

    ID: 17473
    Updated by: hm2k@php.net
    Reported By: hm2k at php dot net
    Summary: undefined constant SOL_UDP
    Status: Feedback
    Type: Bug
    Package: Net_DNS
    Package Version: 1.0.1
    PHP Version: 5.3.2
    Roadmap Versions:
    New Comment:

    http://codepad.org/ZWctvLkd
    http://ideone.com/n8Bq6

    However, on my system (5.3.2) it returns:

    bool(true)
    17

    While using Quercus I get:

    bool(false)
    17

    There is a definite inconsistency.


    Previous Comments:
    ------------------------------------------------------------------------

    [2010-08-08 12:44:43] doconnor

    -Status: Open
    +Status: Feedback
    Alrighty, what does the below render (to ask a stupid question)?

    <?php
    var_dump(extension_loaded("sockets"));
    echo SOL_UDP;

    ------------------------------------------------------------------------

    [2010-06-09 21:59:33] hm2k

    It must be enabled otherwise socket_create() wouldn't exist to return
    that kind of error.

    It doesn't occur all of the time and I'm unable to isolate a case at the
    moment.

    Perhaps it wouldn't harm to check if it's defined or not and then define
    it if not.

    ------------------------------------------------------------------------

    [2010-06-08 00:05:02] doconnor

    That's really odd - SOL_UDP is part of the PHP socket extension.

    http://theserverpages.com/php/manual/en/function.socket-create.php

    Can you check your php.ini to ensure you've got it properly enabled?

    ------------------------------------------------------------------------

    [2010-06-07 20:18:23] hm2k

    Description:
    ------------
    PHP Notice: Use of undefined constant SOL_UDP - assumed 'SOL_UDP' in
    /usr/lib/php/Net/DNS/Resolver.php on line 950
    PHP Warning: socket_create() expects parameter 3 to be long, string
    given in /usr/lib/php/Net/DNS/Resolver.php on line 950


    Test script:
    ---------------
    I'm not 100% sure how to reproduce at this moment in time.

    ------------------------------------------------------------------------
  • Bate at Aug 9, 2010 at 8:26 am
    Edit report at http://pear.php.net/bugs/bug.php?id=17473&edit=1

    ID: 17473
    Updated by: bate@php.net
    Reported By: hm2k at php dot net
    Summary: undefined constant SOL_UDP
    Status: Feedback
    Type: Bug
    Package: Net_DNS
    Package Version: 1.0.1
    PHP Version: 5.3.2
    Roadmap Versions:
    New Comment:

    try to set error_reporting(E_ALL) and you will get a notice .. SOL_UDP
    isnt defined ...


    Previous Comments:
    ------------------------------------------------------------------------

    [2010-08-09 08:25:29] hm2k

    http://codepad.org/ZWctvLkd
    http://ideone.com/n8Bq6

    However, on my system (5.3.2) it returns:

    bool(true)
    17

    While using Quercus I get:

    bool(false)
    17

    There is a definite inconsistency.

    ------------------------------------------------------------------------

    [2010-08-08 12:44:43] doconnor

    -Status: Open
    +Status: Feedback
    Alrighty, what does the below render (to ask a stupid question)?

    <?php
    var_dump(extension_loaded("sockets"));
    echo SOL_UDP;

    ------------------------------------------------------------------------

    [2010-06-09 21:59:33] hm2k

    It must be enabled otherwise socket_create() wouldn't exist to return
    that kind of error.

    It doesn't occur all of the time and I'm unable to isolate a case at the
    moment.

    Perhaps it wouldn't harm to check if it's defined or not and then define
    it if not.

    ------------------------------------------------------------------------

    [2010-06-08 00:05:02] doconnor

    That's really odd - SOL_UDP is part of the PHP socket extension.

    http://theserverpages.com/php/manual/en/function.socket-create.php

    Can you check your php.ini to ensure you've got it properly enabled?

    ------------------------------------------------------------------------

    [2010-06-07 20:18:23] hm2k

    Description:
    ------------
    PHP Notice: Use of undefined constant SOL_UDP - assumed 'SOL_UDP' in
    /usr/lib/php/Net/DNS/Resolver.php on line 950
    PHP Warning: socket_create() expects parameter 3 to be long, string
    given in /usr/lib/php/Net/DNS/Resolver.php on line 950


    Test script:
    ---------------
    I'm not 100% sure how to reproduce at this moment in time.

    ------------------------------------------------------------------------
  • Bate at Aug 9, 2010 at 8:27 am
    Edit report at http://pear.php.net/bugs/bug.php?id=17473&edit=1

    ID: 17473
    Updated by: bate@php.net
    Reported By: hm2k at php dot net
    Summary: undefined constant SOL_UDP
    Status: Feedback
    Type: Bug
    Package: Net_DNS
    Package Version: 1.0.1
    PHP Version: 5.3.2
    Roadmap Versions:
    New Comment:

    i try to reproduce this


    Previous Comments:
    ------------------------------------------------------------------------

    [2010-08-09 08:26:36] bate

    try to set error_reporting(E_ALL) and you will get a notice .. SOL_UDP
    isnt defined ...

    ------------------------------------------------------------------------

    [2010-08-09 08:25:29] hm2k

    http://codepad.org/ZWctvLkd
    http://ideone.com/n8Bq6

    However, on my system (5.3.2) it returns:

    bool(true)
    17

    While using Quercus I get:

    bool(false)
    17

    There is a definite inconsistency.

    ------------------------------------------------------------------------

    [2010-08-08 12:44:43] doconnor

    -Status: Open
    +Status: Feedback
    Alrighty, what does the below render (to ask a stupid question)?

    <?php
    var_dump(extension_loaded("sockets"));
    echo SOL_UDP;

    ------------------------------------------------------------------------

    [2010-06-09 21:59:33] hm2k

    It must be enabled otherwise socket_create() wouldn't exist to return
    that kind of error.

    It doesn't occur all of the time and I'm unable to isolate a case at the
    moment.

    Perhaps it wouldn't harm to check if it's defined or not and then define
    it if not.

    ------------------------------------------------------------------------

    [2010-06-08 00:05:02] doconnor

    That's really odd - SOL_UDP is part of the PHP socket extension.

    http://theserverpages.com/php/manual/en/function.socket-create.php

    Can you check your php.ini to ensure you've got it properly enabled?

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=17473
  • Bate at Aug 9, 2010 at 8:28 am
    Edit report at http://pear.php.net/bugs/bug.php?id=17473&edit=1

    ID: 17473
    Updated by: bate@php.net
    Reported By: hm2k at php dot net
    Summary: undefined constant SOL_UDP
    Status: Feedback
    Type: Bug
    Package: Net_DNS
    Package Version: 1.0.1
    PHP Version: 5.3.2
    Roadmap Versions:
    New Comment:

    If i run
    var_dump(extension_loaded("sockets")); echo SOL_UDP;
    i get bool(true) and 17 as result ... which php version does you run?


    php -r "var_dump(extension_loaded("sockets")); echo SOL_UDP;"


    Previous Comments:
    ------------------------------------------------------------------------

    [2010-08-09 08:27:37] bate

    i try to reproduce this

    ------------------------------------------------------------------------

    [2010-08-09 08:26:36] bate

    try to set error_reporting(E_ALL) and you will get a notice .. SOL_UDP
    isnt defined ...

    ------------------------------------------------------------------------

    [2010-08-09 08:25:29] hm2k

    http://codepad.org/ZWctvLkd
    http://ideone.com/n8Bq6

    However, on my system (5.3.2) it returns:

    bool(true)
    17

    While using Quercus I get:

    bool(false)
    17

    There is a definite inconsistency.

    ------------------------------------------------------------------------

    [2010-08-08 12:44:43] doconnor

    -Status: Open
    +Status: Feedback
    Alrighty, what does the below render (to ask a stupid question)?

    <?php
    var_dump(extension_loaded("sockets"));
    echo SOL_UDP;

    ------------------------------------------------------------------------

    [2010-06-09 21:59:33] hm2k

    It must be enabled otherwise socket_create() wouldn't exist to return
    that kind of error.

    It doesn't occur all of the time and I'm unable to isolate a case at the
    moment.

    Perhaps it wouldn't harm to check if it's defined or not and then define
    it if not.

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=17473
  • Hm2k at Aug 9, 2010 at 8:59 am
    Edit report at http://pear.php.net/bugs/bug.php?id=17473&edit=1

    ID: 17473
    Updated by: hm2k@php.net
    Reported By: hm2k at php dot net
    Summary: undefined constant SOL_UDP
    Status: Feedback
    Type: Bug
    Package: Net_DNS
    Package Version: 1.0.1
    -PHP Version: 5.3.2
    +PHP Version: 5.2.5
    Roadmap Versions:
    New Comment:

    -PHP Version: 5.3.2
    +PHP Version: 5.2.5
    Actually, my dev server is PHP 5.2.13
    My test production server is PHP 5.2.8

    I am unable to reproduce on these systems.

    However, I am able to reproduce on 5.2.5, which is what codepad uses:

    http://codepad.org/FrMynhoJ


    Previous Comments:
    ------------------------------------------------------------------------

    [2010-08-09 08:28:48] bate

    If i run
    var_dump(extension_loaded("sockets")); echo SOL_UDP;
    i get bool(true) and 17 as result ... which php version does you run?


    php -r "var_dump(extension_loaded("sockets")); echo SOL_UDP;"

    ------------------------------------------------------------------------

    [2010-08-09 08:27:37] bate

    i try to reproduce this

    ------------------------------------------------------------------------

    [2010-08-09 08:26:36] bate

    try to set error_reporting(E_ALL) and you will get a notice .. SOL_UDP
    isnt defined ...

    ------------------------------------------------------------------------

    [2010-08-09 08:25:29] hm2k

    http://codepad.org/ZWctvLkd
    http://ideone.com/n8Bq6

    However, on my system (5.3.2) it returns:

    bool(true)
    17

    While using Quercus I get:

    bool(false)
    17

    There is a definite inconsistency.

    ------------------------------------------------------------------------

    [2010-08-08 12:44:43] doconnor

    -Status: Open
    +Status: Feedback
    Alrighty, what does the below render (to ask a stupid question)?

    <?php
    var_dump(extension_loaded("sockets"));
    echo SOL_UDP;

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=17473
  • Bate at Aug 9, 2010 at 9:09 am
    Edit report at http://pear.php.net/bugs/bug.php?id=17473&edit=1

    ID: 17473
    Updated by: bate@php.net
    Reported By: hm2k at php dot net
    Summary: undefined constant SOL_UDP
    Status: Feedback
    Type: Bug
    Package: Net_DNS
    Package Version: 1.0.1
    PHP Version: 5.2.5
    Roadmap Versions:
    New Comment:

    http://www.php.net/manual/de/function.socket-create.php#81938
    can you please verify this notice ?


    Previous Comments:
    ------------------------------------------------------------------------

    [2010-08-09 08:59:49] hm2k

    -PHP Version: 5.3.2
    +PHP Version: 5.2.5
    Actually, my dev server is PHP 5.2.13
    My test production server is PHP 5.2.8

    I am unable to reproduce on these systems.

    However, I am able to reproduce on 5.2.5, which is what codepad uses:

    http://codepad.org/FrMynhoJ

    ------------------------------------------------------------------------

    [2010-08-09 08:28:48] bate

    If i run
    var_dump(extension_loaded("sockets")); echo SOL_UDP;
    i get bool(true) and 17 as result ... which php version does you run?


    php -r "var_dump(extension_loaded("sockets")); echo SOL_UDP;"

    ------------------------------------------------------------------------

    [2010-08-09 08:27:37] bate

    i try to reproduce this

    ------------------------------------------------------------------------

    [2010-08-09 08:26:36] bate

    try to set error_reporting(E_ALL) and you will get a notice .. SOL_UDP
    isnt defined ...

    ------------------------------------------------------------------------

    [2010-08-09 08:25:29] hm2k

    http://codepad.org/ZWctvLkd
    http://ideone.com/n8Bq6

    However, on my system (5.3.2) it returns:

    bool(true)
    17

    While using Quercus I get:

    bool(false)
    17

    There is a definite inconsistency.

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=17473

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedAug 8, '10 at 12:44p
activeAug 9, '10 at 9:09a
posts7
users3
websitepear.php.net

3 users in discussion

Bate: 4 posts Hm2k: 2 posts Daniel Oconnor: 1 post

People

Translate

site design / logo © 2022 Grokbase