Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Hassan_Ahmed_19's avatar

cURL error 28: Connection timed out after 10000 milliseconds (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://192.168.100.88/jwt-api-token-auth/

Issue Description

I am using a library to extract data from a ZKT attendance machine. The package works correctly on my local environment, but when I deployed it to my cPanel, it is not functioning as expected.

I am encountering the following error:

cURL error 28: Connection timed out after 10001 milliseconds (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://192.168.100.88/jwt-api-token-auth/

public function getTokenFromApi() { $url = "http://192.168.100.88:80/jwt-api-token-auth/"; $username = $this->getUsername(); $password = $this->getPassword(); $data = [ 'username' => $username, 'password' => $password, ];

try {
    $response = Http::withHeaders([
        'Content-Type' => 'application/json',
    ])->post($url, $data)->json();
    
    return $response['token'] ?? null;
} catch (\Exception $e) {
    \Log::error('API Request Error: ' . $e->getMessage());
    throw $e;
}

}

Problem Analysis

The error message indicates that the request to http://192.168.100.88/jwt-api-token-auth/ is timing out after 10 seconds. This suggests that the cPanel environment is unable to establish a connection to the specified IP address.

0 likes
1 reply
webard's avatar

192.168.100.88 is local address. If cPanel is installed in other network (other machine, other datacenter), it won't work.

You have two solutions:

  • have public IP on network where ZKT machine is installed and open 88 port to world (bad idea) or only to specific external IP (better idea)

  • configure VPN and establish connection between cPanel server and network where ZKT machine is installed (I think it is best and secure solution)

Please or to participate in this conversation.