I have a problem that I cannot be sure is traceable to the Maps API, but it started occurring after I started using the API and the cause remains mysterious.
I am getting the error “PHP has encountered an Access Violation at …” on an intermittent basis. I find that once it starts occurring, it continues happening for about an entire day, and then it mysteriously stops occurring again for a day or two. The problem started happening after I started using the Google Maps API to access data on mailing addresses via calls of the form simplexml_load_file(“http://maps.google.com/maps/geo? output=xml&key=" . GoogleKey . "&q=" . urlencode($sAnAddress)); I wonder if the problem is caused by something the calls to Google do to affect the server over time, so that the error is not directly caused by any single such call, but by the cumulative effect of hundreds of such calls in some mysterious way. I am running PHP on a commercial server at Hostway.com, so I don’t have the ability to reboot the server as a test. Nor do I think I have the ability to check PHP error logs or ini files on my own. I’ve written to Hostway support about the problem and am waiting for their reply, but I’m afraid they might just tell me it’s a programming problem they can’t help me with. I've also posted about it on the PHP general e-mail list. I have reduced the problem to a very simple script that shows it occurs on a call to “file_get_contents()” on a URL. It can likewise occur on calls to “simplexml_load_file()”. Note that the problem is not directly caused by these function calls because I can run scripts with those calls over and over again until suddenly the error starts occurring without any discernible cause. Even after the error does start occurring, it does not occur when I call “file_get_contents()” on a file, only on a URL, but the URL does not have to be valid, so the problem is not being caused by actual data transfer in an open stream. See below for the code that yields the problem, when the problem is occurring, along with two example outputs from it, and with links to the script running on the server so you can see the problem yourself, unless the intermittency phase is that the error is not being generated at the moment you try it! The second example shows that the problem occurs without successfully opening a stream. It seems to me that this means the problem is somewhere in the server that my script is running on, not caused by any connection to another server. The test script does not indicate any relationship between the problem and Google Maps. Remember, the reason I am asking about it here is that the problem began occurring after I started using the Maps API and I wonder if there could be some relationship, somehow. Does anyone have any idea what is going on or how to test or check things on the server to figure out what the problem is? Stumped, Marshall ============================== <html> <head> <title>Test</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 ============================== --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en -~----------~----~----~----~------~----~------~--~---
