|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-09-12 13:27 UTC] php at painfullscratch dot nl
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: --------------- pet@workmate:/tmp$ sudo /etc/init.d/apache2 restart > /dev/null 2>&1 pet@workmate:/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' pet@workmate:/tmp$ links -dump http://localhost/snmp_set_quick_print.php snmp_set_quick_print: '' | pid: '9406' pet@workmate:/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' PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 23:00:01 2025 UTC |
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