Skip to content

WHMCS/Prve debug connection issue #1

@slrslr

Description

@slrslr

Hello,

when i add new Prve server in WHMCS 6.3.2 / Products / Servers, save and test connection it says "FAILED:".

How can i please debug the reason why it fails? My WHMCS is hosted on cPanel + Apache server.
In PVE v. 5.0-23 /var/log/pveproxy/access.log i can not find any related access.

I added line
error_reporting(E_ALL);
into this module files and found this error line:

PHP Notice: Undefined variable: success in /home/myusername/public_html/modules/servers/prve/prve.php on line 234

in /admin/error_log file. Here is the /modules/servers/prve/prve.php on line 234 :

function prve_TestConnection(array $params)
{
try {
// Call the service's connection test function.
$serverip = $params["serverip"];
$serverusername = $params["serverusername"];
$serverpassword = $params["serverpassword"];
$proxmox=new PVE2_API($serverip, $serverusername, "pam", $serverpassword);
if ($proxmox->login())
$success = true;
$errorMsg = '';
} catch (Exception $e) {
// Record the error in WHMCS's module log.
logModuleCall(
'provisioningmodule',
FUNCTION,
$params,
$e->getMessage(),
$e->getTraceAsString()
);
$success = false;
$errorMsg = $e->getMessage();
}
return array(
'success' => $success,
'error' => $errorMsg,
);
}

230 line is: $success = false;

Please kindly let me know if You need further information? Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions