Difference between revisions of "License Troubleshooting"

From WHMCS Documentation

(Curl Error: Connection refused - Code 7)
 
(19 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
If you are encountering a licensing error when accessing your WHMCS installation's administration area, this could indicate that your server is unable to communicate with our license server. This page details the most common errors and provides some suggested resolutions.
 +
 
==License Invalid==
 
==License Invalid==
 
A Licence Invalid error on the admin login page can be caused by one of the following changes:
 
A Licence Invalid error on the admin login page can be caused by one of the following changes:
 
*The license key has been entered incorrectly<br/>
 
*The license key has been entered incorrectly<br/>
Please ensure the full key is entered, this includes the prefix eg. "Leased-", "Owned-", "WebHost-" and "Dev-".
+
Please ensure the full key is entered, this includes the prefix eg. "Leased-", "Owned-", "WebHost-", "WHMCS-" and "Dev-".
 
*The domain being used to access your install has changed
 
*The domain being used to access your install has changed
 
*The IP address your install is located on has changed
 
*The IP address your install is located on has changed
 
*The directory you are using has changed<br />
 
*The directory you are using has changed<br />
Following any changes to the location of your WHMCS installation, the licence must be updated accordingly. Please refer to [[#Moving WHMCS|Moving WHMCS]] above for instructions on doing so.
+
Following any changes to the location of your WHMCS installation, the license must be updated accordingly. Please refer to [[Licensing#Moving_WHMCS|Moving WHMCS]] for instructions on doing so.
 
 
==No Connection Error==
 
A No Connection error on the admin login page suggests there is a problem preventing your server from communicating with the WHMCS licensing server. This is commonly a CURL or DNS resolution problem, these are essential items in the use of WHMCS and is something your server admin will need to investigate and correct.
 
  
*CURL - CURL is an extremely important part of WHMCS and is needed for a number of the operations performed such as server connections etc.
+
==Specific Errors==
*DNS - DNS is a vital part of internet functionality in order to be able to resolve hostnames of servers, domain name lookups, and licensing. Ensure your DNS resolve whmcs.com to the correct IP address.
+
===Required function base64_decode is not available===
 +
This error indicates that your server has the required ''base64_decode'' function disabled in your PHP configuration. Please adjust your website's PHP configuration so as to enable the ''base64_decode'' function.
  
To test the connection between your server and the WHMCS licence server, a built-in test tool is available on the admin area login page:
+
It may be necessary for the function to be added at the server level. The following links might be helpful in accomplishing this on your server:
 +
* https://documentation.cpanel.net/display/EA4/EasyApache+4+Home
 +
* https://docs.plesk.com/en-US/onyx/administrator-guide/web-hosting/php-management.70668/
  
/admin/login.php?conntest=1
+
If you need further assistance, you may need to reach out to your web host or systems administrator to resolve this.
  
For example, if your admin area is located at http://yourdomain.com/admin/login.php, you'd visit http://yourdomain.com/admin/login.php?conntest=1
+
===Required function is not available===
 +
This error will appear when a necessary CURL function has not been installed on your server or is disabled in the configuration. The error message will specify the required function which has been disabled, eg:
 +
*curl_init
 +
*curl_setopt
 +
*curl_exec
 +
*curl_getinfo
 +
*curl_error
 +
*curl_close
  
A successful test result looks like:
+
All of these functions must be installed and enabled on your server in order to properly validate your license. You can check to see if these functions are available on your server by:
 +
# Creating a PHP Info page, as described in the [http://php.net/manual/en/function.phpinfo.php#refsect1-function.phpinfo-examples  PHP Documentation]
 +
# Visiting the PHPInfo page in your browser
 +
# Referring to the "disable_functions" section
 +
# If the functions in the above listed are present under disable_functions, the functions are disabled on your server. It will be necessary to enable them to resolve the licence error.
  
Testing Connection to 'https://licensing28.whmcs.com/license/test.php'...
+
The following links might be helpful in accomplishing this on your server:
URL resolves to 184.94.192.12 ... Ok
+
* https://documentation.cpanel.net/display/EA4/EasyApache+4+Home
Response Code: 200
+
* https://docs.plesk.com/en-US/onyx/administrator-guide/web-hosting/php-management.70668/
Connection Successful!
+
* https://curl.haxx.se/docs/install.html
  
or
+
If you need further assistance, you may need to reach out to your web host or systems administrator to resolve this.
  
Testing Connection to 'https://licensing28.whmcs.com/license/test.php'...
+
===Curl Error: Couldn't resolve host (6)===
URL resolves to 208.74.124.169 ... Ok
+
A CURL code 6 error indicates an inability for your DNS to resolve the WHMCS licensing server. This could indicate a temporary issue with your DNS provider, or a larger misconfiguration.
Response Code: 200
 
Connection Successful!
 
  
If you see any errors, it will be necessary to work with your server admin/hosting provider to resolve the cURL connectivity issue. Showing the test results should assist in their troubleshooting.
+
If these points have been eliminated, check your Zone files for the presence of an entry for whmcs.com and remove it if found.
  
===Caveat for Shared and Reseller Hosted Customers===
+
===Curl Error: Couldn't connect to host (7)===
Some hosting providers may operate very restrictive environments, which results in a No Connection error despite the aforementioned test returning a successful result.
+
A CURL code 7 error indicates an inability to connect to the WHMCS licensing server. This is typically caused by a firewall configuration. CURL uses port 443 for secure connections, so ensure that connections are permitted on this port.
  
In this situation, we have found that changing the PHP version to 7 resolves the error. Instructions for doing this are located here: https://www.hostgator.com/help/article/php-configuration-plugin
+
===Curl Error: Connection refused - Code 7===
 +
See above.
  
==Required function base64_decode is not available==
+
===Curl Error: Problem with the SSL CA cert (path? access rights?) - 77===
This error indicates that your server has the required base64_decode function disabled in your PHP configuration. You'll need to reach out to your web host or systems administrator to resolve this.
+
See [[License Troubleshooting#Outdated Root CA Bundles|Outdated Root CA Bundles]]
  
==Required function xxxx is not available==
+
===Curl Error: error setting certificate verify locations===
This error will appear when a necessary CURL function has not been installed on your server or is disabled in the configuration. The "xxxx" will be replaced with a required function that has been disabled, i.e. curl_init, curl_setopt, curl_exec, curl_getinfo, curl_error, curl_close. All of these functions must be installed and enabled on your server in order to properly validate your license. You'll need to reach out to your web host or systems administrator to resolve this.
+
See [[License Troubleshooting#Outdated Root CA Bundles|Outdated Root CA Bundles]]
  
==Outdated Root CA Bundles==
+
===Outdated Root CA Bundles===
In version 7.0 and above we have changed the license validation callback to require it to be made via SSL connection. This helps to ensure the security and integrity of your license.
+
The license validation is performed via an SSL connection. This helps to ensure the security and integrity of license checks.
  
Certain errors are being generated when placing the CURL call using the "curlopt_ssl_verifypeer" function as your server does not have the appropriate root certificate authority (CA) bundles to validate the SSL connection to our licensing server. This can be caused by the CA bundle files being missing or outdated.
+
Errors can occur when placing the CURL call using the "curlopt_ssl_verifypeer" function if your server does not have the appropriate root certificate authority (CA) bundles to validate the SSL connection to our licensing server. This can be caused by the CA bundle files being missing or outdated.
  
 
Note: This error does '''not''' relate to the validity or existence of an SSL certificate on your own website. The CA bundles referred to here are located on the server side at root level.
 
Note: This error does '''not''' relate to the validity or existence of an SSL certificate on your own website. The CA bundles referred to here are located on the server side at root level.
  
If you are unsure how to check for these certificates or update them, it is best to contact your web host or systems administrator for assistance.
+
Frequently updated CA Root Certificates are available from your Operating System's repository or the cURL website at https://curl.haxx.se/docs/caextract.html
  
==Curl Error: Problem with the SSL CA cert (path? access rights?) - 77==
+
If you are unsure how to check for these certificates or update them, we recommend that you contact your web host or systems administrator for assistance.
See [[License Troubleshooting#Outdated Root CA Bundles]]
 
  
==Curl Error: error setting certificate verify locations==
+
===Other Curl Error Codes===
See [[License Troubleshooting#Outdated Root CA Bundles]]
+
Other CURL error codes are detailed in the official documentation at https://curl.haxx.se/libcurl/c/libcurl-errors.html

Latest revision as of 18:46, 15 October 2021

If you are encountering a licensing error when accessing your WHMCS installation's administration area, this could indicate that your server is unable to communicate with our license server. This page details the most common errors and provides some suggested resolutions.

License Invalid

A Licence Invalid error on the admin login page can be caused by one of the following changes:

  • The license key has been entered incorrectly

Please ensure the full key is entered, this includes the prefix eg. "Leased-", "Owned-", "WebHost-", "WHMCS-" and "Dev-".

  • The domain being used to access your install has changed
  • The IP address your install is located on has changed
  • The directory you are using has changed

Following any changes to the location of your WHMCS installation, the license must be updated accordingly. Please refer to Moving WHMCS for instructions on doing so.

Specific Errors

Required function base64_decode is not available

This error indicates that your server has the required base64_decode function disabled in your PHP configuration. Please adjust your website's PHP configuration so as to enable the base64_decode function.

It may be necessary for the function to be added at the server level. The following links might be helpful in accomplishing this on your server:

If you need further assistance, you may need to reach out to your web host or systems administrator to resolve this.

Required function is not available

This error will appear when a necessary CURL function has not been installed on your server or is disabled in the configuration. The error message will specify the required function which has been disabled, eg:

  • curl_init
  • curl_setopt
  • curl_exec
  • curl_getinfo
  • curl_error
  • curl_close

All of these functions must be installed and enabled on your server in order to properly validate your license. You can check to see if these functions are available on your server by:

  1. Creating a PHP Info page, as described in the PHP Documentation
  2. Visiting the PHPInfo page in your browser
  3. Referring to the "disable_functions" section
  4. If the functions in the above listed are present under disable_functions, the functions are disabled on your server. It will be necessary to enable them to resolve the licence error.

The following links might be helpful in accomplishing this on your server:

If you need further assistance, you may need to reach out to your web host or systems administrator to resolve this.

Curl Error: Couldn't resolve host (6)

A CURL code 6 error indicates an inability for your DNS to resolve the WHMCS licensing server. This could indicate a temporary issue with your DNS provider, or a larger misconfiguration.

If these points have been eliminated, check your Zone files for the presence of an entry for whmcs.com and remove it if found.

Curl Error: Couldn't connect to host (7)

A CURL code 7 error indicates an inability to connect to the WHMCS licensing server. This is typically caused by a firewall configuration. CURL uses port 443 for secure connections, so ensure that connections are permitted on this port.

Curl Error: Connection refused - Code 7

See above.

Curl Error: Problem with the SSL CA cert (path? access rights?) - 77

See Outdated Root CA Bundles

Curl Error: error setting certificate verify locations

See Outdated Root CA Bundles

Outdated Root CA Bundles

The license validation is performed via an SSL connection. This helps to ensure the security and integrity of license checks.

Errors can occur when placing the CURL call using the "curlopt_ssl_verifypeer" function if your server does not have the appropriate root certificate authority (CA) bundles to validate the SSL connection to our licensing server. This can be caused by the CA bundle files being missing or outdated.

Note: This error does not relate to the validity or existence of an SSL certificate on your own website. The CA bundles referred to here are located on the server side at root level.

Frequently updated CA Root Certificates are available from your Operating System's repository or the cURL website at https://curl.haxx.se/docs/caextract.html

If you are unsure how to check for these certificates or update them, we recommend that you contact your web host or systems administrator for assistance.

Other Curl Error Codes

Other CURL error codes are detailed in the official documentation at https://curl.haxx.se/libcurl/c/libcurl-errors.html