Edit report at http://bugs.php.net/bug.php?id=43410&edit=1
ID: 43410
Comment by: andy_wolk at mail dot ru
Reported by: andy_wolk at mail dot ru
Summary: SNMP cause "PHP has encountered an Access Violation"
when wrong IP or CommStr
Status: No Feedback
Type: Bug
Package: SNMP related
Operating System: Windows 2003 Server Enterprise
PHP Version: 5.2.5
Block user comment: N
New Comment:
Still got the problem. We use the latest 5.2.x version as isapi. But no
luck.
I think we are not alone. Check this out (a post from Mar
2010)http://stackoverflow.com/questions/154290/php-access-violation/2482839#2482839
Previous Comments:
------------------------------------------------------------------------
[2008-10-29 01:00:01] 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".
------------------------------------------------------------------------
[2008-10-21 12:06:43] [email protected]
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
Do not paste such huge texts here. Put them somewhere in net (like
http://phpfi.com/) where we can check them out.
------------------------------------------------------------------------
[2007-11-26 11:50:45] andy_wolk at mail dot ru
Description:
------------
SNMP functions cause "PHP has encountered an Access Violation" when
wrong IP or Community String.
IIS 6 + PHP5.2.2dev isapi module.
PHP_snmp.dll (ver 5.2.2.2)
All next php versions has the same problem.
After this error, IIS does not can operate with snmp module and needs to
be restarted.
Event viewer: Faulting application w3wp.exe, version 6.0.3790.3959,
faulting module unknown, version 0.0.0.0, fault address 0x010cfdf4.
No errors in php_error.log
Reproduce code:
---------------
<html>
<head>
<title></title>
</head>
<body>
<?php
echo "Start...";
flush();
$communitystring=''; // Your device must have this string no empty!
$ip='10.200.202.97'; // Sometimes this error occured, when there is no
Device in a network with this IP.
for ($i=1;$i<14;$i++)
{
$port=100+$i;
$oid='.1.3.6.1.2.1.26.2.1.1.5.${port}.1';
@snmpget($ip,$communitystring,$oid);
$oid='.1.3.6.1.2.1.26.2.1.1.5.${port}.1';
@snmpwalk($ip,$communitystring,$oid);
$oid='.1.3.6.1.2.1.2.2.1.7.${port}';
@snmpget($ip,$communitystring,$oid);
$oid='.1.3.6.1.2.1.2.2.1.7.${port}';
@snmpwalk($ip,$communitystring,$oid);
$oid='.1.3.6.1.4.1.43.10.22.1.1.3.1.$i';
@snmpget($ip,$communitystring,$oid);
$oid='.1.3.6.1.4.1.43.10.22.1.1.3.1.$i';
@snmpwalk($ip,$communitystring,$oid);
$oid='.1.3.6.1.4.1.43.10.22.1.1.5.1.$i';
@snmpget($ip,$communitystring,$oid);
$oid='.1.3.6.1.4.1.43.10.22.1.1.5.1.$i';
@snmpwalk($ip,$communitystring,$oid);
$oid='.1.3.6.1.2.1.26.2.1.1.3.${port}.1';
@snmpget($ip,$communitystring,$oid);
$oid='.1.3.6.1.2.1.26.2.1.1.3.${port}.1';
@snmpwalk($ip,$communitystring,$oid);
}
echo "Finish";
?>
</body>
</html>
Expected result:
----------------
Start...Finish
Actual result:
--------------
Start...PHP has encountered an Access Violation at xxxxxxxx
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=43410&edit=1