From:             [EMAIL PROTECTED]
Operating system: RedHat 7.3
PHP version:      4.2.3
PHP Bug Type:     SNMP related
Bug description:  Empty response gives wrong answer

ucd-snmp-4.2.6 & PHP-4.2.3 & Cisco2900xl switch

Example code:

$uptime = snmpget("x.x.x.x", "public", "system.sysUpTime.0");
$ct = snmpget("x.x.x.x", "public", "system.sysContact.0");
echo ">System UpTime : $uptime<br>System Contact :$ct";

If sysContact is not set in Cisco (null string) the sysUpTime would be
copied into $ct. Same effect if using snmpwalk. Fixed by adding into
ext/snmp/snmp.c (v1.56) at line 307:

  retry:
    /* clear buffers */
    buf[0]=(char)0;
    buf2[0]=(char)0;
-- 
Edit bug report at http://bugs.php.net/?id=20494&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=20494&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=20494&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=20494&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=20494&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=20494&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=20494&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=20494&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=20494&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=20494&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=20494&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20494&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=20494&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=20494&r=isapi

Reply via email to