#20494 [Fbk->NoF]: Empty response gives wrong answer

From: Date: Sun, 01 Dec 2002 22:36:07 +0000
Subject: #20494 [Fbk->NoF]: Empty response gives wrong answer
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-26318@lists.php.net to get a copy of this message
ID: 20494 Updated by: sniper@php.net Reported By: kpesio@saunalahti.fi -Status: Feedback +Status: No Feedback Bug Type: SNMP related Operating System: RedHat 7.3 PHP Version: 4.2.3 New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. Previous Comments: ------------------------------------------------------------------------ [2002-11-19 11:38:52] sniper@php.net Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip and the latest net-snmp library. ------------------------------------------------------------------------ [2002-11-19 08:59:15] kpesio@saunalahti.fi 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 this bug report at http://bugs.php.net/?id=20494&edit=1

« previous php.bugs (#26318) next »