Jump to content
The Uniform Server Community
arlanda

failed to open stream (remote URL)

Recommended Posts

I'm unable use file_get_contents function to capture any remote site. The code runs perfectly fine on XP and Vista. All on the same network. I have already looked into htaccess and firewall but to no avail..

 

$homepage = file_get_contents("http://www.example.com/");

echo $homepage;

 

and as shown in the error.log:

 

[Tue Oct 25 18:29:14 2011] [error] [client ::1] PHP Warning: file_get_contents(http://www.example.com/): failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.\r\n in C:\\UniServer\\www\\test\\index.php on line 3

 

Using Orion 7.1.13 on Win7 Pro 64 SP1.

 

Thanks.

Share this post


Link to post
Share on other sites

So do I understand you that this is just a port from the XP system to the Win7-64? If so, it's likely that there may be a problem with it using IPv6 for connecting, or that the firewall really is blocking the connection.

 

What do the access.log and error.log show?

 

Regards,

BobS

Share this post


Link to post
Share on other sites

Hi BobS

 

I'm using the latest version available and the program runs fine on both XP 32 and Vista 32. UniServer does run on Win7 64 but for some reason, the function (file_get_contents) wasn't working for me.

 

Please see original post for detail shown in error.log. I didn't post anything from the access.log as I didn't see anything strange.

 

It is possible that IPv6 is causing the problem because I did see the message "Your Internet IP Address = Not connected or error!" in the Server Status.

 

I'll report back later if fixing the IPv6 issue didn't solve the problem.

 

Thanks!

 

So do I understand you that this is just a port from the XP system to the Win7-64? If so, it's likely that there may be a problem with it using IPv6 for connecting, or that the firewall really is blocking the connection.

 

What do the access.log and error.log show?

 

Regards,

BobS

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...