ID: 32935
User updated by: nospam-php at homeuseonly dot co dot uk
Reported By: nospam-php at homeuseonly dot co dot uk
-Status: Feedback
+Status: Open
Bug Type: SNMP related
Operating System: Windows 2003 SP1 / Windows XP SP
PHP Version: 5CVS-2005-07-04
New Comment:
I have upgraded to the Windows CVS snapshot, but I am still getting
truncated output.
?php
print_R(snmpwalk("192.168.253.10","public",
".1.3.6.1.2.1.25.4.2.1.4"));
?>
gives me:
Array ( [0] => "" [1] => "" [2] => "C:\\WINDOWS" [3] => "C:\\Program
Files\\Microsoft Office\\OFFICE" [4] => "\\SystemRoot\\System3" [5] =>
"C:\\WINDOWS\\system3" [6] => "" [7] => "C:\\WINDOWS\\system3" [8] =>
"C:\\WINDOWS\\system3" [9] => "C:\\WINDOWS\\system3" [10] =>
"C:\\WINDOWS\\system3" [11] => "C:\\WINDOWS\\System3" [12] =>
"C:\\WINDOWS\\system3" [13] => "C:\\WINDOWS\\System3" [14] =>
"C:\\PROGRA~1\\Grisoft\\AV" [15] => "C:\\WINDOWS\\system3" [16] =>
"C:\\WINDOWS\\system3" [17] => "C:\\PROGRA~1\\Grisoft\\AV" [18] =>
"C:\\Program Files\\Alcohol Soft\\Alcohol 1" [19] => "C:\\WINDOWS\
.................SNIP....................
Previous Comments:
------------------------------------------------------------------------
[2005-07-29 18:16:49] [EMAIL PROTECTED]
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
[2005-07-04 09:52:13] nospam-php at homeuseonly dot co dot uk
I downlaoded the Windows version, V5.1.0-dev, as sugested, but I still
have the same problem.
This has been tested on Windows 2003 SP1, running Apache 2.0.54
------------------------------------------------------------------------
[2005-07-04 01:04:25] [EMAIL PROTECTED]
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
[2005-05-12 09:29:24] nospam-php at homeuseonly dot co dot uk
The chunk of PHP code displays and array to the screen.
This array should contain the full results of a snmpwalk against
".1.3.6.1.2.1.25.4.2.1.4" but it appears that the output is being
truncated.
However when a running snmpwalk (snmpwalk -v 1 -c public 192.168.253.13
.1.3.6.1.2.1.25.4.2.1.4)
the output is correct.
Here is the part of the result for the SNMPWALK net-snmp command.
############################### START
HOST-RESOURCES-MIB::hrSWRunPath.1 = ""
HOST-RESOURCES-MIB::hrSWRunPath.4 = ""
HOST-RESOURCES-MIB::hrSWRunPath.136 = STRING:
"C:\\WINDOWS\\System32\\"
HOST-RESOURCES-MIB::hrSWRunPath.272 = STRING: "C:\\Program
Files\\Internet Explorer\\"
HOST-RESOURCES-MIB::hrSWRunPath.280 = STRING: "C:\\Program
Files\\Promise Technology, Inc.\\Promise Array Management\\"
HOST-RESOURCES-MIB::hrSWRunPath.336 = STRING: "C:\\Program
Files\\Promise Technology, Inc.\\Promise Array Management\\"
HOST-RESOURCES-MIB::hrSWRunPath.416 = STRING: "C:\\WINDOWS\\"
HOST-RESOURCES-MIB::hrSWRunPath.460 = STRING:
"C:\\WINDOWS\\system32\\"
HOST-RESOURCES-MIB::hrSWRunPath.496 = STRING:
"C:\\WINDOWS\\system32\\"
HOST-RESOURCES-MIB::hrSWRunPath.508 = STRING:
"C:\\PROGRA~1\\Grisoft\\AVG7\\"
############################### END
------------------------------------------------------------------------
[2005-05-03 23:24:35] nospam-php at homeuseonly dot co dot uk
Description:
------------
When running making specific SNMP get/walks against Windows 2003 or
Windows XP the following has been seen to occur
1. Sometimes the SNMP walk against .1.3.6.1.2.1.25.2.3 the request
times out. If I use GetIf to walk the OID the results are displayed,
but PHP fails randomly
2. When viewing .1.3.6.1.2.1.25.4.2.1.4 with GetIf the file
paths/names are displayed in full, but when I do a SNMP walk the output
is truncated.
Reproduce code:
---------------
The code can be downloaded from
http://sourceforge.net/users/lsms-mrtg/
The example windows code is in the package.
Example of the truncated output
<?php
print_R(snmpwalk("127.0.0.1","public", ".1.3.6.1.2.1.25.4.2.1.4"));
?>
Expected result:
----------------
The full program paths displayed, where appropriate.
Actual result:
--------------
Array ( [0] => "" [1] => "" [2] => "C:\\Program Files\\Promise
Technology, Inc.\\Promise Array Manageme" [3] => "" [4] => "" [5] =>
"C:\\users\\isms\\l" [6] => "" [7] => "C:\\WINDOWS\\System3" [8] =>
"C:\\users\\isms\\l" [9] => "\\SystemRoot\\System3" [10] => "" [11] =>
"c:\\squid\\sbi" [12] => "C:\\WINDOWS\\system3" [13] => "" [14] =>
"C:\\WINDOWS\\system3" [15] => "C:\\WINDOWS\\System3" [16] =>
"C:\\WINDOWS\\system3" [17] => "C:\\WINDOWS\\system3" [18] =>
"C:\\WINDOWS\\system3" [19] => "C:\\users\\isms\\l" [20] => "C:\\FS3"
[21] => "" [22] => "" [23] => "" [24] => "" [25] =>
"C:\\WINDOWS\\System3" [26] => "C:\\WINDOWS\\system3" [27] =>
"C:\\WINDOWS\\system3" [28] => "" [29] => "C:\\Program
Files\\TightVNC-unstabl" [30] => "C:\\PROGRA~1\\Grisoft\\AV" [31] =>
"C:\\users\\isms\\l" [32] => "C:\\Program Files\\Apache
Group\\Apache2\\" [33] => "" [34] => "C:\\PROGRA~1\\Grisoft\\AV" [35]
=> "C:\\Program Files\\Promise Technology, Inc\\Promise Array Manageme"
[36] => "C:\\PROGRA~1\\Grisoft\\AV" [37] => "C:\\WINDOWS\\system3" [38]
=> "C:\\users\\isms\\l" [39] => "" [40] => "C:\\WINDOWS\\System3" [41]
=> "C:\\users\\isms\\l" [42] => "" [43] => "C:\\FS3" [44] =>
"C:\\users\\isms\\l" [45] => "" [46] => "C:\\Program Files\\Promise
Technology, Inc.\\Promise Array Manageme" [47] => "" [48] =>
"C:\\WINDOWS" [49] => "" [50] => "C:\\PROGRA~1\\Grisoft\\AV" [51] =>
"C:\\WINDOWS" [52] => "C:\\Program Files\\ASUS\\Pro" [53] =>
"C:\\WINDOWS\\system3" [54] => "C:\\Program Files\\ATI
Technologies\\ATI Control Pan" [55] => "" [56] => "" [57] =>
"C:\\WINDOWS\\system32\\wb" [58] => "C:\\Program Files\\Apache
Group\\Apache2\\" [59] => "C:\\FS3" [60] => "" [61] =>
"C:\\PROGRA~1\\HAUPPA~" [62] => "" [63] =>
"C:\\PROGRA~1\\HAUPPA~1\\Hardwa" [64] => "" [65] => "C:\\Program
Files\\Apache Group\\Apache2\\" [66] =>
"C:\\PROGRA~1\\HAUPPA~1\\Hardwa" [67] => "" [68] =>
"C:\\WINDOWS\\system3" [69] => "" )
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32935&edit=1