php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20494 Empty response gives wrong answer
Submitted: 2002-11-19 08:59 UTC Modified: 2002-12-01 16:36 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: kpesio at saunalahti dot fi Assigned:
Status: No Feedback Package: SNMP related
PHP Version: 4.2.3 OS: RedHat 7.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
28 - 26 = ?
Subscribe to this entry?

 
 [2002-11-19 08:59 UTC] kpesio at saunalahti dot 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;

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-19 11:38 UTC] 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-12-01 16:36 UTC] sniper@php.net
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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 19:01:29 2024 UTC