Access violation error
am 16.10.2009 23:56:16 von Marshall Burns
------=_NextPart_000_001C_01CA4E70.D0FBD870
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
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:
==============================
Test crawler
$sURL = $_GET['URL'];
echo('Getting ' . $sURL . '
');
$sFileCont = file_get_contents('http://' . $sURL);
echo('
Dump:' . $sFileCont);
?>
==============================
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
------=_NextPart_000_001C_01CA4E70.D0FBD870--
Re: Access violation error
am 17.10.2009 00:52:03 von List Manager
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:
>
> ==============================
>
>
>
>
>
> Test crawler
>
>
>
>
>
>
>
>
>
> $sURL = $_GET['URL'];
>
>
>
> echo('Getting ' . $sURL . '
');
>
> $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('
Dump:' . $sFileCont);
>
>
>
> ?>
>
>
>
>
>
> ==============================
>
> 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
Re: Access violation error
am 17.10.2009 00:56:30 von Ashley Sheridan
--=-yvQfYldzdjky9oFxb3q5
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
On Fri, 2009-10-16 at 15:52 -0700, Jim Lucas wrote:
> 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:
> >
> > ==============================
> >
> >
> >
> >
> >
> > Test crawler
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > $sURL = $_GET['URL'];
> >
> >
> >
> > echo('Getting ' . $sURL . '
');
> >
> > $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('
Dump:' . $sFileCont);
> >
> >
> >
> > ?>
> >
> >
> >
> >
> >
> > ==============================
> >
> > 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.
>
>
Have you move servers at all, or has the server you're running the
script on now been updated recently?
Thanks,
Ash
http://www.ashleysheridan.co.uk
--=-yvQfYldzdjky9oFxb3q5--