UpCloudLtd / upcloud-whmcs-module

A module for integrating UpCloud's services with WHMCS web hosting platform
MIT License
9 stars 11 forks source link

Module commands from admin server view error out #51

Open scop opened 1 week ago

scop commented 1 week ago

Module commands (at least Start VPS, Stop VPS, Reboot VPS, Suspend, Unsuspend) do not work but result in 500 internal server errors.

The error trace below is for Start VPS, but the trace points to vmManager's create for some reason.

NOTICE: PHP message: [WHMCS Application] ERROR: ParseError: syntax error, unexpected variable "$message" in /var/www/html/modules/servers/upCloudVps/lib/vmManager.php:105 Stack trace:
#0 /var/www/html/modules/servers/upCloudVps/upCloudVps.php(130): WHMCS\Module\Autoloader->moduleClassLoader('WHMCS\\Module\\Se...')
#1 [internal function]: upCloudVps_StartVPS(Array)
#2 /var/www/html/vendor/whmcs/whmcs-foundation/lib/Module/AbstractModule.php(0): call_user_func('upCloudVps_Star...', Array)
#3 /var/www/html/vendor/whmcs/whmcs-foundation/lib/Module/Server.php(0): WHMCS\Module\AbstractModule->call('StartVPS', Array)
#4 /var/www/html/includes/modulefunctions.php(0): WHMCS\Module\Server->call('StartVPS', Array)
#5 /var/www/html/admin/clientsservices.php(0): ServerCustomFunction(12, 'StartVPS', 0, Array)
#6 {main} {"exception":"[object] (ParseError(code: 0): syntax error, unexpected variable \"$message\" at /var/www/html/modules/servers/upCloudVps/lib/vmManager.php:105)"} []
adityawbwce commented 6 days ago

Not able to reproduce it with stop VPS command and it works as you can see in the module log

image

image

No problem with Start VPS Command it works for me as you can see below:

image