Bug #46065 [Com]: snmp_set_quick_print() persists between requests
| From: | lytboris@php.net | Date: | Sun, 05 Jan 2014 18:27:45 +0000 |
| Subject: | Bug #46065 [Com]: snmp_set_quick_print() persists between requests | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-183600@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=46065&edit=1
ID: 46065
Comment by: lytboris@php.net
Reported by: php at painfullscratch dot nl
Summary: snmp_set_quick_print() persists between requests
Status: No Feedback
Type: Bug
Package: SNMP related
Operating System: *
PHP Version: 5.*, 6
Assigned To: lytboris
Block user comment: N
Private report: N
New Comment:
This bug was fixed in branch 5.4 and not backported to any versions prior 5.4.
Please upgrade to 5.4.x or newer, this bug will not be fixed in 5.3.
Previous Comments:
------------------------------------------------------------------------
[2014-01-05 15:19:21] php at painfullscratch dot nl
Bug still present in "PHP 5.3.10-1ubuntu3.9 with Suhosin-Patch (cli) (built: Dec 12 2013
04:27:25)".
$ cat snmp_get_quick_print.php
<?php printf("snmp_get_quick_print: '%s' || %d\n", snmp_get_quick_print(),
posix_getpid()); ?>
$ cat snmp_set_quick_print.php
<?php printf("snmp_set_quick_print: '%s' || %d\n",
snmp_set_quick_print(true), posix_getpid()); ?>
$ for (( i=0; i<5; i++ )) ; do links -dump http://localhost/snmp_get_quick_print.php;
done
snmp_get_quick_print: '' || 3458
snmp_get_quick_print: '' || 3459
snmp_get_quick_print: '' || 3460
snmp_get_quick_print: '' || 3461
snmp_get_quick_print: '' || 3462
$ links -dump http://localhost/snmp_set_quick_print.php
snmp_set_quick_print: '' || 3458
$ for (( i=0; i<5; i++ )) ; do links -dump http://localhost/snmp_get_quick_print.php;
done
snmp_get_quick_print: '' || 3459
snmp_get_quick_print: '' || 3460
snmp_get_quick_print: '' || 3461
snmp_get_quick_print: '' || 3462
snmp_get_quick_print: '1' || 3458
------------------------------------------------------------------------
[2012-02-25 09:41:00] lytboris@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.
------------------------------------------------------------------------
[2011-01-31 12:58:04] lytboris@php.net
Please try using this snapshot:
http://snaps.php.net/php-trunk-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
Please check OO API from trunk. It has an option to specify session-wise OID output format and more.
Sources in trunk can be compiled against downto php 5.2
------------------------------------------------------------------------
[2009-09-08 21:16:19] larryjadams at comcast dot net
The snmp module needs a bit of rededesign. It should handle many of the commands from the native
calls, like multiple OID get's in a single array, in other words, make the OID a mixed type for
a get request.
Also, the snmp functions should require a resource (aka snmp session) in order to work, just like is
done in the API, for which it would be based.
In that case, to setup a quick print, you start a session, receive a pointer to a
(structure/resource) in return and then all subsequent calls need to also pass the resource to the
function. Once you are done, you need to close the sessions.
This will have to be a new class of calls though as simply changing thing around will make life
difficult for everyone.
TheWitness
------------------------------------------------------------------------
[2008-10-24 08:56:21] jani@php.net
It's pretty simple issue, propably need to add some netsnmp shutdown function in RINIT which
clears all the settings between requests.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=46065
--
Edit this bug report at https://bugs.php.net/bug.php?id=46065&edit=1