2009/12/16 René Fournier <m...@renefournier.com>:
> On 2009-12-15, at 11:55 PM, Richard Quadling wrote:
> Do you have a default stream context defined for the http stream?
> Nope.
> A _LONG_ time ago, when I was using a firewall with NTLM
> authentication (which PHP doesn't deal with), I had to route all my
> calls through a local proxy.
> This was the code I had ...
> <?php
> // Define the default, system-wide context.
> $r_default_context = stream_context_get_default(
> array(
> 'http' => array( // All HTTP requests are passed through the local
> NTLM proxy server on port 8080.
> 'proxy' => 'tcp://',
> 'request_fulluri' => True,
> ),
> )
> );
> // Though we said system wide, some extensions need a little coaxing.
> libxml_set_streams_context($r_default_context);
> Now, you may not see this in your code, but may be in a script which
> is loaded via auto_prepend_file.
> Wish it were, but my test code is bare bones.
> I would also suggest running something like WireShark at the same time
> as your script. See if there is ANY traffic over the wire.
> Do the cURL and file_get_contents() code generate identical requests?
> cURL -- both PHP and command-line -- fetches files and URLs (remote and
> local) w/o issues. file_get_contents() fetches files, but fails on all URLs
> (remote and local). This is why I believe the problem lies with the
> machine's configuration and not the Firewall.
> It's pretty confounding, isn't it? I'm not sure what to do at this point.
> ...Rene

But by using something like WireShark you can see exactly what
requests ARE being made. You may be getting a redirect reply which is
failing or something daft. Anything really.

Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

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

Reply via email to