ID: 32935 Updated by: [EMAIL PROTECTED] Reported By: nospam-php at homeuseonly dot co dot uk -Status: No Feedback +Status: Open Bug Type: SNMP related Operating System: Windows 2003 SP1 / Windows XP SP PHP Version: 5CVS-2005-07-29 New Comment:
This bug appears to still be open. Previous Comments: ------------------------------------------------------------------------ [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 ------------------------------------------------------------------------ [2006-01-01 01:00:05] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [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 ------------------------------------------------------------------------ [2005-11-03 13:18:12] nospam-php at homeuseonly dot co dot uk I have tried changing the magic_ options. it made no differance. They were at the default setting. ------------------------------------------------------------------------ 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