Hello,

 

            There may be a more appropriate mailing list to address this
problem to. If so, please suggest.

 

            I have written a PHP script to crawl a public government website
to collect public data for analysis. When the script was nearing completion
and almost ready for real use, it suddenly started crashing with the error
"PHP has encountered an Access Violation at .". I determined that this error
is generated after the script calls the function "file_get_contents()" on a
URL for the government site.

 

            I Googled the error message and also searched for it and for
just "access violation" at PHP.net. I found a lot of discussion of bugs that
generate that error, but nothing about the actual meaning of the error when
it is not caused by a bug. 

 

            I wonder if the problem could be that the government site has
either automatically or manually shut off access to my IP address because of
the frequent queries from it during testing of the script. I can't find that
out by just trying to go to the site through my browser because the script
is running on a remote server, so if an IP address has been banned it is the
address of that server, and I can't browse from there. So in order to find
out what is going on, I need to know more about the error.

 

            I searched the PHP source code and found the error message in
"php-5.3.0\sapi\isapi\php5isapi.c" in the function HttpExtensionProc(),
which seems to be related to exception handling. The relevant code, starting
at line 906 of the C file, appears to be:

 

             else if (_exception_code()==EXCEPTION_ACCESS_VIOLATION) {

                        _snprintf(buf, sizeof(buf)-1,"PHP has encountered an
Access Violation at %p", 

 
e->ExceptionRecord->ExceptionAddress);

 

            To understand what this means, I searched the source code for
"exception_code", "ACCESS_VIOLATION", and "ExceptionAddress". Nothing
relevant comes up. This is mysterious because I don't understand where this
C program is supposed to get this function, variable, and object from if
they're not in the code..

 

            So I am lost. Can someone tell me what is the meaning of an
access violation exception, how to find out where it is coming from, and the
significance of the address in the error message.

 

            Aside from actually figuring this out, a way to find out if my
server has been banned would be to run the script from a different server.
The server I'm using is the commercial server that hosts my company's
website. Are there public servers available that can be used to run PHP
scripts from?

 

            Thanks for your help.

 

Marshall Burns, PhD

www.MBurns.com <http://www.mburns.com/> 

 

 

Reply via email to