
When your site calls an outside service (a payment, an API, an update) and it fails, PHP returns a cURL error number. The three most seen say different things: 6, the address name could not be resolved; 7, the connection was refused; 28, time ran out with no reply. Each has a typical cause and a first test. The message appears in curl_error($ch) and the number in curl_errno($ch). In WordPress it usually shows up in Site Health and in updates as “cURL error 28”.
The three, side by side
| Error | Message | It means | First test |
| 6 | Could not resolve host | PHP could not find out the IP of the address. | Is the address spelled right? Open it in a browser. |
| 7 | Failed to connect | It reached the address, but the connection was refused or never set up. | Are the port and protocol right? Is the service up? |
| 28 | Operation timed out | The connection existed or sat waiting, but the reply did not arrive in time. | Is the service slow to answer? Is the time set too short? |
Error 6: cannot resolve the name
|
|
|
Error 7: connection refused
|
|
|
Error 28: time ran out
|
|
|
|
| A timeout rather than “refused” suggests something is silently dropping the request, typically a firewall rule at the destination. Refused fast is almost always a wrong port or a stopped service. Timed out is almost always a block or slowness. It is a clue, not a certainty. |
| Some errors are not your server’s. The code is yours, the service is someone else’s. Our support looks at the server side but does not repair third-party integrations: the boundary is in how far our support goes. |
|
Want to know whether your server can reach an outside address? Send us the address, the port and the full error message. Open a support ticket |
|
SEE ALSO Which ports are open, and why your integration hangs without an error |
RECOMMENDED PRODUCT Web hosting with cPanel Domain and SSL included, daily backups and the panel you already know. from $6.59/mo (3-year plan, with coupon) See plans |
- 0 Users Found This Useful











