WHMCS Frequently asked questions

1. Why doesn't WHMCS cron job sync my domains?

The Openprovider domain module for WHMCS uses a separate script for syncing domains statuses and due dates between your Openprovider and WHMCs instance. The WHMCS domain sync task doesn't include time when comparing expiration dates between registrar and WHMCS, so some domains didn't sync correctly for our users. As a result, we created a seperate task included in the module.

To sync your domains with Openprovider, you can set up a cron job to run the script

<WHMCS root>/modules/registrars/openprovider/cron/DomainSync.php

The module documentation goes into more detail.

2. Why am I getting an authentication error?

Check the following things, after changing your password in Openprovider:

  • Ensure that the correct password is being entered into the module
  • Ensure that the password, and not the hash, is entered in the module
  • Ensure that two-factor authentication is not enabled for the credentials which you are using for the module. (To maintain security, create a technical contact in your Reseller Control Panel, and whitelist only the IP addresses of your WHMCS instance )
  • Ensure that you see that the module authenticates after clicking "save" (see screenshot, the DNS template box will appear)

3. I'm getting an error "Sync Not Supported by Registrar Module"

In order to sync domain statuses, renewal dates, WPP settings and autorenew settings between your Openprovider account and your WHMCS instance, you will need to set up the Openprovider cron job, which is detailed in the README.md document. 

4. Does the module support the default domain sync in WHMCS?

Yes, native domain synchronisation is supported since version 3.3. Check Use the native WHMCS synchronisation? checkbox in the configuration settings of the module. When enabled, WHMCS' native synchronisation feature will be used to sync domain data. However, DomainSync.php script should still be configured to run by cron to sync non-active and expired domains, but the Update interval parameter can be set to 24 hours (or more).

5. Authentication errors

  1. Are you using the correct login / password (not hash) ?
  2. Is the URL correct (https://api.cte.openprovider.eu) for the login / password combination?
  3. Is the problem with the whitelist? Try removing all IPs from the whitelist. If your system then works, you can check the IP address by the following command from command line of the server hosting your WHMCS instance:
    dig +short myip.opendns.com @resolver1.opendns.com

6. How can I create a custom setup for registering domains which require additional information, such as .es, .us, .travel, .ru, and so on ?

The 2.3-beta release of the module introduced a function openprovider_additional_fields() function, which retrieves the list of required additional information for any given TLD from the Openprovider API.

If you do not have the file  <your WHMCS directory>/resources/domains/additionalfields.php then add the example version from resources/domains/additionalfields.phpOtherwise add the following lines to the top of your additionalfields.php file. :

if (function_exists('openprovider_additional_fields'))
    $additionaldomainfields = openprovider_additional_fields();

Once this has been added, the correct text fields and/or select boxes will be created automatically on the WHMCS checkout page.

Here you will find more information from the WHMCS website.

6.1 I want to add IDN support

Some TLDs require an additional data element for IDN support. This can be set up for a given TLD by doing the following:

in the file <WHMCS root>/resources/domains/additionalfields.php add the following line of array element definitions:

$com_idn_type =  array (
    'English'    => 'ENG',
    'Slovenian'  => 'SLV',
    'Russian'    => 'RUS'

$additionaldomainfields[".com"][] = array(
 "Name" => "idnScript",
 'DisplayName'=> "IDN language",
 "Type" => "dropdown",
 'Options' => join ( $com_idn_type, ',' ),
 "Default" => "English",   
 'Required' => true);

6.2 How can I add intendedUse for certain TLDs?

Some TLDs require an "intended use" statement when registering. You can set this up for your customers quite easily by doing the following:

In the file <WHMCS root>/resources/domains/additionalfields.php add the following line of array element definitions:

$additionaldomainfields['.cat'][] = array(
    'Name' => 'intendedUse',
    'DisplayName'    => 'Intended Use',
    'Type'     => 'text',
    'Size' => '30',
    'Required'     => true

Now when the domain is being registered, there will be a text box where the customer can write a description, which the module will send to Openprovider via API.

7. How can I set up default name servers?

This can be found in the WHMCS knowledge base for domain configurations.

To set the default nameservers that WHMCS will use for domain only registrations ordered through the system, navigate to Setup > General Settings > Domains tab.

See attached screenshot (link at the bottom) to see how to do this.


7.1 How can I hard-code nameservers into the module ?

If you using the "DNS management" plugin for WHMCS, this is most likely the issue. A previous version of the module had the Openprovider nameservers hard-coded to be used in the case that DNS management is selected. This has since been removed.

If you'd like to hard-code your nameservers into the module, to be used for register and transfer operations, you can modify the function createNameserversArray in the file <WHMCS root>modules/registrars/openprovider/OpenProvider/API/APITools.php

Add these variables:

$params['ns1'] = <desired nameserver>
$params['ns2'] = <desired nameserver>
$params['ns3'] = <desired nameserver>
$params['ns4'] = null;
$params['ns4'] = null;

and your domains will be created using the nameservers you've specified.

8. How to debug a "Oops, something went wrong and we couldn't process your request" error?

When trying to view the module credentials page

From their php error log they receive an error:

[Tue Feb 20 11:14:33.488187 2018] [:error] [pid 15335] [client] [WHMCS Application] ERROR: exception 
'Whoops\\Exception\\ErrorException' with message 'Class 'DOMDocument' not found' in /home/corpitse/public_html/clients/modules/registrars/openprovider/OpenProvider/API/Request.php:21 

Stack trace: #0 
WHMCS\\Utility\\Error\\Run->handleError(1, 'Class 'DOMDocum...', 
'/home/corpitse/...', 21) #1 [internal function]: 
WHMCS\\Utility\\Error\\Run->handleShutdown() #2 {main} 
{"exception":"[object] (Whoops\\\\Exception\\\\ErrorException(code: 1): 
Class 'DOMDocument' not found at /home/corpitse/public_html/clients/modules/registrars/openprovider/OpenProvider/API/Request.php:21)"} 
[], referer: https://corpresa.com/clients/admin/configregistrars.php

Based on this error, it appears that the DOM extension is not installed on your server. This extension is usually installed by default, so it may have simply been disabled by you or your hosting provider. If you're using CloudLinux, check to see if DOM is enabled.

Please see http://php.net/manual/en/dom.installation.php for more information

9. I want to run the cron job from the web, and not from the command line

From the file <whmcs root>/modules/registrars/openprovider/cron/DomainSync.php comment out the following:

if((!isset($_SESSION['adminid']) && $_SESSION['adminid'] == false) && !is_cli())

This will allow you to run the file from a public folder.

10. Updating registrant details via WHMCS fails

Reseller is trying to update registrant details via WHMCS having international phone number input interface and automatic formatting option enabled.


[postValues] => <?xml version="1.0" encoding="UTF-8"?>
<openXML><credentials><username>YHWHMCS</username><password>****************</password><client>whmcs-2.2.8</client></credentials><createCustomerRequest><companyName>De Beste B.V.</companyName><vat></vat><name><initials>J.V</initials><firstName>Jos</firstName><prefix></prefix><lastName>Verkerk</lastName></name><gender>M</gender><address><street>Boddens Hosangweg</street><number>64</number><suffix></suffix><zipcode>2481 LA</zipcode><city>Woubrugge</city><state>Zuid-Holland</state><country>NL</country></address><phone><countryCode>+31</countryCode><areaCode>+31</areaCode><subscriberNumber>.31880101200</subscriberNumber></phone><email>10008@my.yourhost.nl</email><handle>NL904610-NL</handle><additionalData></additionalData></createCustomerRequest></openXML>


[curlResponse] => <?xml version="1.0" encoding="UTF-8"?>
<openXML><reply><code>133</code><desc>Invalid telephone region code number!</desc><data/></reply></openXML>
[curlErrNo] => 0
[errorMessage] =>

The option can be toggled in Settings -> General settings -> Localisation:


The option changes the appearance of the phone number input box from one having pre-formatted configuration like:


to a simple empty text field.

Having this option enabled results in wrong number formatting and thus the registrant details update fails.

To workaround just disable the option and specify the phone number in a format like +XXX.XXXXXXX having dot (.) symbol included as a delimiter.

Was this article helpful?
6 out of 7 found this helpful
Additional questions? Submit a request