Re: Access violation error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Marshall Burns wrote:
> 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);
> 

Is allow_url_fopen enabled?

http://us.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen

> 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

Not sure.  Review above suggestion.

> 
> ==============================
> 
> 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
> 

This should:

When I do this...
# host www.badurl.com

I get this...
Host www.badurl.com not found: 3(NXDOMAIN)

> 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.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux