Skip to content

PHP updated to 8.5.0->8.5.2 (and 8.5.1) and snmp-get #1800

@safelock1

Description

@safelock1

Affected Page URL

no

Describe the bug

In php I use snmp get

$session = new SNMP(SNMP::VERSION_2c, $ip_olt_loc, $snmp,300000);
list($nic,$signal) = explode('"',$session->get("1.3.6.1.4.1.3902.1015.1010.1.1.1.29.1.5.$sum"));
list($nic,$oltrx) = explode(':',$session->get("1.3.6.1.4.1.3902.1015.1010.11.2.1.2.".$olt_rx[$rack."/".$card."/".$slot]."."$onu));
list($nic,$onoff) = explode(':',$session->get("1.3.6.1.4.1.3902.1015.1010.1.7.4.1.17.$sum"));
list($nothing,$updown) = explode(':',$session->get("1.3.6.1.4.1.3902.1015.1010.1.1.1.5.1.2.$sum.1"));
list($nic,$deregister) = explode('"',$session->get("1.3.6.1.4.1.3902.1015.1010.1.7.4.1.16.$sum"));
list($nic,$register) = explode('"',$session->get("1.3.6.1.4.1.3902.1015.1010.1.7.4.1.12.$sum"));

In PHP 8.5.0, everything works fine; it reads every SNMP.
After updating to 8.5.2 (and 8.5.1), it only reads the first GET request, and any subsequent ones are not processed. Reverting to 8.5.0 starts working correctly.
Both PHP 8 versions compiled with the same src parameters

Steps to reproduce

  1. list($nic,$signal) = explode('"',$session->get("1.3.6.1.4.1.3902.1015.1010.1.1.1.29.1.5.$sum")); - its OK
  2. list($nic,$oltrx) = explode(':',$session->get("1.3.6.1.4.1.3902.1015.1010.11.2.1.2.".$olt_rx[$rack."/".$card."/".$slot]."."$onu)); - not read
  3. list($nic,$onoff) = explode(':',$session->get("1.3.6.1.4.1.3902.1015.1010.1.7.4.1.17.$sum")); not read

Expected behavior

SNMP GET should retrieve every snmp oid, not just the first command executed

Screenshots

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions