|  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
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-2024 The PHP Group
All rights reserved.
Last updated: Wed May 29 16:01:32 2024 UTC