#35371 [NEW]: Wrong Values retriving Object
From: matteo dot bertato at hiport dot it
Operating system: Fedora Core 2,4
PHP version: 4.4.1
PHP Bug Type: SNMP related
Bug description: Wrong Values retriving Object
Description:
------------
Retriving SNMP Object value in SNMP_VALUE_OBJECT mode,
give me wrong result, despite using default mode gives correct result.
(Tested with Net_SNMP 5.2.1.2 on FC4)
(Tested with Net_SNMP 5.1.1 on FC2)
PHP compiled with --with-snmp --enable-ucd-snmp-hack
Reproduce code:
---------------
<?php
print_R(snmpget('1.1.1.1',
'public','1.3.6.1.2.1.2.2.1.6.2')."\n");
snmp_set_valueretrieval(SNMP_VALUE_OBJECT);
print_R(snmpget('1.1.1.1','public','1.3.6.1.2.1.2.2.1.6.2'));
// Getting Mac Address of Second Network Interface
// This is a Standard MIB object
?>
Expected result:
----------------
STRING: 0:50:e8:1:46:e6
stdClass Object
(
[type] => 4
[value] => 0:50:e8:1:46:e6
)
Actual result:
--------------
stdClass Object
(
[type] => 4
[value] => PèFæ
)
STRING: 0:50:e8:1:46:e6
--
Edit bug report at http://bugs.php.net/?id=35371&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35371&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35371&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35371&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=35371&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35371&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35371&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35371&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35371&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35371&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35371&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=35371&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=35371&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35371&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35371&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35371&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35371&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35371&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35371&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35371&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35371&r=mysqlcfg
Thread (4 messages)
- matteo dot bertato at hiport dot it