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.



Was this answer helpful?

Add to Favourites
Print this Article

Also Read
Official cPanel Manual (Views: 2479)
Official WHM Manual (Views: 2251)
PHP Time Zone Errors (Views: 670)