[php-src] Issue #21132: SNMP second GET not work on 8.5.1 (wok ok on 8.5.0)
[email protected] (safelock1)
| Newsgroups | php.bugs |
|---|---|
| Message-ID | <Y7okk1e6GIkLcY6fKnnuEhT6Bc4ddBxExI6cHXuOXf4@main.internal.php.net> |
Issue: https://github.com/php/php-src/issues/21132
Author: safelock1
### Description
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
list($nic,$signal) = explode('"',$session->get("1.3.6.1.4.1.3902.1015.1010.1.1.1.29.1.5.$sum")); - its OK
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
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
### PHP Version
```plain
PHP 8.5.1 (cli) (built: Feb 4 2026 19:35:46) (ZTS)
Copyright (c) The PHP Group
Zend Engine v4.5.1, Copyright (c) Zend Technologies
with Zend OPcache v8.5.1, Copyright (c), by Zend Technologies
```
### Operating System
_No response_