PHP fsockopen() error

7 posts by 3 authors in: Forums > CMS Builder
Last Post: July 1, 2014   (RSS)

By Toledoh - June 25, 2014

Hey Guys,

I'm trying to install CMSB on a new server, but get he following error

Error: PHP fsockopen() and/or network connectivity disabled!
Test connection to www.google.com return error #110 - Connection timed out

Please ask your server administrator to enable network connectivity for PHP.

I only have FTP access, no control panel, so everything has to go through their tech support.  The last email back from them said:

From what I can see there is nothing stopping the connection on our end. I wrote a test script which attempts to open a connection to google.com and this timed out. I then modified this to connect to infinite.net.au and it connected fine, so i tried a few IPs outside of our network to make sure that it does work with traffic leaving our network, and these connections also worked without issue. The only way I can get it to fail is to use google.com as the connection target. Unfortunately there is nothing we can do to change this behavior. If you're able to change where the CMS is trying to do its tests to, then you may have more luck using a different host name. 

The server is running 5.4.28.

I've also tried the test file from http://www.interactivetools.com/forum/forum-posts.php?postNum=2201380#post2201380 and that works fine.

Any thoughts?

Any ideas?

Cheers,

Tim (toledoh.com.au)

By Steve99 - June 26, 2014

Hey Tim,

If your install is hosted in a shared environment, the server IP may be blocked by Google for email abuse or some such.

Given that the server tech had timeouts connecting to Google, and it worked with other web servers, I'd think that to be the cause - however, there could be other causes. If the server tech ran his test script on the shared hosting account, that would further back up my thought of the IP being blacklisted by Google. It could also be the web hosts network IP's being blocked for abusive traffic going to Google.

You can modify that file in CMSB temporarily to connect to other hosts for some self testing.

Hope this helps.

Cheers,
Steve

By Steve99 - June 26, 2014

Hey Tim, I just re-read the end of your post stating that you tried that demo file from the other forum post and it worked with a TCP connection to google...

It could be an intermittent latency issue.

By Toledoh - June 26, 2014

Hey Dave. I'm on the road, so will try your tests later today. My post was correct, I get an error on install, but the test file works fine. 

Cheers,

Tim (toledoh.com.au)

By Dave - June 26, 2014

Hi Tim, 

It's odd that one could connect and the other couldn't.  Feel free to email over CMS/FTP details and steps to reproduce to dave@interactivetools.com and I can take a look if you like.  Note: Email, don't post login details to the forum.

Dave Edis - Senior Developer
interactivetools.com

By Dave - July 1, 2014

Hi All, 

For anyone else with a similar issue we've tracked it down to a configuration issue with the host.  The particular issue was that IPv6 was enabled so requests to internet servers were getting IPv6 addresses instead of IPv4 but the IPv6 traffic was being blocked at the firewall or otherwise not getting outside the network.

I've added some code to the next release that tries to connect to both google.com and google's IPv4 IP address to detect when IPv6 configuration issues are preventing things from working.

Cheers!

Dave Edis - Senior Developer
interactivetools.com