How to fix: fsockopen() unable to connect (Connection timed out) errors

Are you seeing an error like this on your page?  PHP Warning: fsockopen() unable to connect to x.x.x.x (Connection timed out)

If so the cause is probably because you're trying to connect to a remote server on a port other than the standard web port (port 80).

By default only port 80 is open for fsock commands. If you require access to a remote server on another port please contact our support team who will review your request.

Please note that firewall access will only be granted if the remote IP is static (i.e. the IP doesn't change).


Note: PHP fopen is disabled by default on our servers, for information on how to enable it click here.

  • 63 Users Found This Useful
Was this answer helpful?

Related Articles

Cant access your website? Server Status page says everything is online?

It's likely that you've been blocked by our firewall. The server may appear as down...

Official cPanel Manual

Click here to view the Offiicial cPanel Manual, every question you have related to...

Importing MySQL into cPanel (& Common Mistakes)

To import a database into cPanel the database needs to exist.If it doesn't cPanel may give...

How to fix: URL file-access is disabled in the server configuration

Are you seeing an error like this on your page?  URL file-access is disabled in the...

PHP Time Zone Errors

If you are seeing time or time zone error messages on your website, this can be solved by using a...