From:             php at painfullscratch dot nl
Operating system: Linux
PHP version:      5.2.6
PHP Bug Type:     SNMP related
Bug description:  Unexpected behavior snmp_set_quick_print()

Description:
------------
When PHP runs under Apache and snmp_set_quick_print(TRUE) is issued, the
behavior of all SNMP-related functions will be "quick print" for the
lifetime of the PID. 

NET-SNMP Support => enabled
NET-SNMP Version => 5.4.1
PHP version: 5.2.4

There are two possibilities:
 1) This behavior is "by design": If this is the case I think the manual
page for snmp_set_quick_print() needs a warning for this behavior.
 2) This is a bug: For each PID the behavior should be (re)set to the
default behavior after execution of the script.


Reproduce code:
---------------
[EMAIL PROTECTED]:/tmp$ sudo /etc/init.d/apache2 restart > /dev/null 2>&1
[EMAIL PROTECTED]:/tmp$ for (( i=0; i<5; i++ )) ; do links -dump
http://localhost/snmp_get_quick_print.php; done
   snmp_get_quick_print: '' | pid: '9402'
   snmp_get_quick_print: '' | pid: '9403'
   snmp_get_quick_print: '' | pid: '9404'
   snmp_get_quick_print: '' | pid: '9405'
   snmp_get_quick_print: '' | pid: '9406'
[EMAIL PROTECTED]:/tmp$ links -dump http://localhost/snmp_set_quick_print.php
   snmp_set_quick_print: '' | pid: '9406'
[EMAIL PROTECTED]:/tmp$ for (( i=0; i<5; i++ )) ; do links -dump
http://localhost/snmp_get_quick_print.php; done
   snmp_get_quick_print: '' | pid: '9403'
   snmp_get_quick_print: '' | pid: '9404'
   snmp_get_quick_print: '' | pid: '9446'
   snmp_get_quick_print: '' | pid: '9405'
   snmp_get_quick_print: '1' | pid: '9406'


-- 
Edit bug report at http://bugs.php.net/?id=46065&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=46065&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=46065&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=46065&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=46065&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=46065&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=46065&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=46065&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=46065&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=46065&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=46065&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=46065&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=46065&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=46065&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=46065&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=46065&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=46065&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=46065&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=46065&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=46065&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=46065&r=mysqlcfg

Reply via email to