I am developing a crawler. It has worked fine throughout testing until this
morning, when suddenly it started yielding an access violation error. I have
not been able to find any explanation of this. I've reduced the script to
the following test code:
==============================
<html>
<head>
<title>Test crawler</title>
</head>
<body>
<?php
$sURL = $_GET['URL'];
echo('<p>Getting ' . $sURL . '<p>');
$sFileCont = file_get_contents('http://' . $sURL);
echo('<br>Dump:' . $sFileCont);
?>
</body>
</html>
==============================
Running this with various inputs, I get:
==============================
www.ennex.com/util/php/test.php?URL=www.Google.com
Getting www.Google.com
PHP has encountered an Access Violation at 0A0591E4
==============================
www.ennex.com/util/php/test.php?URL=www.BadURL.com
Getting www.BadURL.com
Warning: file_get_contents() [function.file-get-contents]:
php_network_getaddresses: getaddrinfo failed: No such host is known. in
D:\WWWRoot\ennex.com\www\util\php\test.php on line 11
PHP has encountered an Access Violation at 0A11B8D6
==============================
The second result shows that it doesn't have to successfully open a stream
to yield the error.
The "file_get_contents()" function was working just fine throughout
development of the script. Now it yields an access violation. Anybody have
any idea what is going on?
Thanks for your help.
Marshall Burns, PhD
www.MBurns.com <http://www.mburns.com/>