Jump to content

Vultr Module Not Working in WHMCS 7.6 php72


Recommended Posts

In reigniting this post..https://whmcs.community/topic/291043-vultr-module-is-broken-vultr-support-not-helping/

 

Whilst the thread states that this issue is resolved...it is not!

 

For a start, the latest module download clearly shows php 7.0 and php 7.1 (not 7.2)...so if that standard is to be believed, then this module cannot possibly function correctly with the php7.2 and after install, mine doesnt work.

 

Can someone please advise on how i go about fixing this?

Link to comment
Share on other sites

I should add, I get an API key error...even though my vultr API key is valid and is currently used by Blesta (so i know the API key works). I am not sure what will happen to my blesta installation if i generate a new API key? Below is the apache error log for this...

 

Quote

[Fri May 17 07:46:35.573458 2019] [fcgid:warn] [pid 32201] [client <ipaddress>:51310] mod_fcgid: stderr: [WHMCS Application] ERROR: ArgumentCountError: Too few arguments to function MGModule\\vultr\\mgLibs\\process\\AbstractController::__construct(), 0 passed in /home/domain/domains/host.domain.com.au/public_html/modules/addons/vultr/Addon.php on line 236 and exactly 1 expected in /home/domain/domains/host.domain.com.au/public_html/modules/addons/vultr/mgLibs/process/AbstractController.php:16 Stack trace: #0 /home/domain/domains/host.domain.com.au/public_html/modules/addons/vultr/Addon.php(236): MGModule\\vultr\\mgLibs\\process\\AbstractController->__construct() #1 /home/domain/domains/host.domain.com.au/public_html/modules/addons/vultr/vultr.php(52): MGModule\\vultr\\Addon::getHTMLAdminPage(Array) #2 /home/domain/domains/host.domain.com.au/public_html/admin/addonmodules.php(0): vultr_output(Array) #3 {main} {"exception":"[object] (ArgumentCountError(code: 0): Too few arguments to function MGModule\\\\vultr\\\\mgLibs\\\\process\\\\AbstractController::__construct(), 0 passed in /home/domain/domains/host.domain.com.au/public_html/modules/addons/vultr/Addon.php on line 236 and exactly 1 expected at /home/domain/domains/host.domain.com.au/public_html/modules/addons/vultr/mgLibs/process/AbstractController.php:16)"} [], referer: https://host.domain.com.au/admin/addonmodules.php
[Fri May 17 07:46:43.919461 2019] [fcgid:warn] [pid 6480] [client <ipaddress>:51311] mod_fcgid: stderr: [WHMCS Application] ERROR: ArgumentCountError: Too few arguments to function MGModule\\vultr\\mgLibs\\process\\AbstractController::__construct(), 0 passed in /home/domain/domains/host.domain.com.au/public_html/modules/addons/vultr/Addon.php on line 236 and exactly 1 expected in /home/domain/domains/host.domain.com.au/public_html/modules/addons/vultr/mgLibs/process/AbstractController.php:16 Stack trace: #0 /home/domain/domains/host.domain.com.au/public_html/modules/addons/vultr/Addon.php(236): MGModule\\vultr\\mgLibs\\process\\AbstractController->__construct() #1 /home/domain/domains/host.domain.com.au/public_html/modules/addons/vultr/vultr.php(52): MGModule\\vultr\\Addon::getHTMLAdminPage(Array) #2 /home/domain/domains/host.domain.com.au/public_html/admin/addonmodules.php(0): vultr_output(Array) #3 {main} {"exception":"[object] (ArgumentCountError(code: 0): Too few arguments to function MGModule\\\\vultr\\\\mgLibs\\\\process\\\\AbstractController::__construct(), 0 passed in /home/domain/domains/host.domain.com.au/public_html/modules/addons/vultr/Addon.php on line 236 and exactly 1 expected at /home/domain/domains/host.domain.com.au/public_html/modules/addons/vultr/mgLibs/process/AbstractController.php:16)"} [], referer: https://host.domain.com.au/admin/addonmodules.php

 

Edited by adamjedgar
Link to comment
Share on other sites

I have my solution.

What i did not realise is that in order for API commands in WHMCS to work with the Vultr WHMCS module, BIND must be running on the VPS. Because i use registrar A records to point at domains on my system, BIND was not enabled. The tell tail sign was running the following command...

 

curl -H 'API-Key: YOURKEY' "https://api.vultr.com/v1/server/list"

 

It returned 

0curl: (6) Could not resolve host: api.vultr.com

 

I did an mxtoolbox dns lookup for api.vultr.com and it resolved to an ipaddress, so i knew that the innability to resolve the host my being caused by my server. I immediately realised that i had recently disabled BIND because i wasnt using it for any domain resolutions on my system. As soon as i restarted BIND...

API-Key: APIKEY' https://api.vultr.com/v1/account/info
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0
100   114    0   114    0     0     43      0 --:--:--  0:00:02 --:--:--    43
{"balance":"0","pending_charges":"xxx.03","last_payment_date":"2019-05-01 05:06:22","last_payment_amount":"-xxx.15"}

Problem resolved.

 

Hope this helps someone else should they strike a similar problem in the future...ensure BIND is also running on your vps.

Edited by adamjedgar
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated