|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11294 Incorrect results returned on error
Submitted: 2001-06-05 14:36 UTC Modified: 2001-06-06 01:15 UTC
From: richarde at eskom dot co dot za Assigned:
Status: Closed Package: SNMP related
PHP Version: 4.0.4pl1 OS: Linux Redhat 6.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: richarde at eskom dot co dot za
New email:
PHP Version: OS:


 [2001-06-05 14:36 UTC] richarde at eskom dot co dot za
Simple code like the code below generates ugly messages in the php code if the host has an error or is unable to connect for some reason:

$networks = snmpwalk('', 'public', ".");

These types of errors are shown:

Warning: No Response from 147.110.52.xx in /home/httpd/html/iptrack/test.php3 on line 20

This is in contradiction to what it states in the manual:

array snmpwalk (string hostname, string community, string object_id [, int timeout [, int retries]])
Returns an array of SNMP object values starting from the object_id() as root and false on error.

I think all the snmp functions have the same problems.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-06 01:15 UTC]
This is not a bug. This is how all PHP functions
behave in case of errors. You can set many error
reporting directives in php.ini which control
how the errors are reported. Or you can use @ in front
of function which will make it not to print out any errors:

$networks = @snmpwalk('', 'public', ".");

Manual is your friend, read it sometimes.. :)


PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Sep 24 19:03:38 2021 UTC