Edit report at https://bugs.php.net/bug.php?id=64159&edit=1
ID: 64159
User updated by: loic dot blot at unix-experience dot fr
Reported by: loic dot blot at unix-experience dot fr
Summary: Truncated snmpget
-Status: Feedback
+Status: Open
Type: Bug
Package: SNMP related
Operating System: FreeBSD 9.1
PHP Version: 5.4.11
Block user comment: N
Private report: N
New Comment:
do this on a CISCO 2950, 2960, 3750 or 4500 (that's all devices i have tested)
with proper community and ip.
<?php echo snmpget("192.168.1.1","2c","public","1.3.6.1.4.1.9.9.46.1.6.1.1.4");
?>
Previous Comments:
------------------------------------------------------------------------
[2013-02-06 21:54:24] [email protected]
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.
Please avoid embedding huge scripts into the report.
------------------------------------------------------------------------
[2013-02-05 16:18:46] loic dot blot at unix-experience dot fr
Description:
------------
Hello,
Since php 5.4.11 i get a problem on snmpget function. I haven't the problem
with system snmpget command.
large responses for snmpget are truncated.
I think there is a buffer problem.
Expected result:
----------------
but instead i get:
7F FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
Actual result:
--------------
For example, snmpget (on CISCO switches), really returns:
7F FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64159&edit=1