ID: 32935 Comment by: bugs dot php dot net at marnik dot org Reported By: nospam-php at homeuseonly dot co dot uk Status: No Feedback Bug Type: SNMP related Operating System: Windows 2003 SP1 / Windows XP SP PHP Version: 5CVS-2005-07-29 New Comment:
new bug opened: http://bugs.php.net/bug.php?id=42556 Previous Comments: ------------------------------------------------------------------------ [2007-09-04 22:39:36] [EMAIL PROTECTED] But the original reportee doesn't -> back to no feedback (open new report instead!) ------------------------------------------------------------------------ [2007-09-04 14:20:09] [EMAIL PROTECTED] This bug appears to still be open. ------------------------------------------------------------------------ [2007-09-04 14:14:42] bug dot php dot net at marnik dot org I am having the same problem, PHP version 5.2.3 on windows XP and Windows 2003. I have an SNMP variable (a string) that contains a path and filename. Using snmpset() to set a string to "A\B\C\D" works, but when retrieving the same value with snmpget() you get "A\\B\\C". I think the stringlength is calculated on A\B\C\D (which is 7 chars), and then the string is returned with backslashes escaped. The returned string is also 7 chars, but because of the escaped backslashes the last characters fall off. ------------------------------------------------------------------------ [2006-04-26 13:02:13] frog2wah at gmail dot com Let's hope i'll wake up the bug ... Havin the same problem with the apache/php couple running on windows, and querying XP clients, latest snmp module installed with php 5.1.1 The double backslash problem seems to appear only on particular mibs like host.hrSWRun.hrSWRunTable.hrSWRunEntry.hrSWRunPath A little testing : Running a linux snmpwalk (no php) to scan on a xp box gives : HOST-RESOURCES-MIB::hrSWRunPath.120 = STRING: "C:\\WINDOWS\\System32\\" using windows getif software on the same mib : host.hrSWRun.hrSWRunTable.hrSWRunEntry.hrSWRunPath.120 : C:\Windows\System32\ Now the query result from php : ["host.hrSWRun.hrSWRunTable.hrSWRunEntry.hrSWRunPath.120"]=> string(22) ""C:\\WINDOWS\\System3"" I'd say : as php is using net-snmp (am i wrong ?), it gets the \\ result from it (as far as i know getif doesn't use net-snmp and gets a different result, that's why i think so). But PHP itself did not resize the variable that holds the returned value, and that would be why you lose 1 caracter per backslash ------------------------------------------------------------------------ [2005-12-24 02:37:19] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip ------------------------------------------------------------------------ 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 http://bugs.php.net/32935 -- Edit this bug report at http://bugs.php.net/?id=32935&edit=1