RE: [MODULE] WHMCS
10-25-2016, 11:24 AM
(This post was last modified: 10-25-2016, 11:25 AM by pomtom44.)
(10-23-2016, 02:06 AM)Rynoxx Wrote:(10-22-2016, 07:52 AM)pomtom44 Wrote:(10-21-2016, 10:36 PM)Rynoxx Wrote:(10-21-2016, 01:47 PM)pomtom44 Wrote: Rynoxx
Sorry to bother you again,
Done some digging of my own and managed to get these logs from the module logger
Code:Caught exception: Server error response [url] https://IP.Removed.for.Privacy/api/domains [status code] 500 [reason phrase] Internal Server Error
/var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/vendor/guzzlehttp/guzzle/src/Subscriber/HttpError.php(33): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Message\Request), Object(GuzzleHttp\Message\Response))
Forum Add-ons and Usage /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/vendor/guzzlehttp/guzzle/src/Event/Emitter.php(109): GuzzleHttp\Subscriber\HttpError->onComplete(Object(GuzzleHttp\Event\CompleteEvent), 'complete')
MySupport Addon /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/vendor/guzzlehttp/guzzle/src/RequestFsm.php(91): GuzzleHttp\Event\Emitter->emit('complete', Object(GuzzleHttp\Event\CompleteEvent))
Test of MySupport MOD /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/vendor/guzzlehttp/guzzle/src/RequestFsm.php(132): GuzzleHttp\RequestFsm->__invoke(Object(GuzzleHttp\Transaction))
#4 /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/vendor/react/promise/src/FulfilledPromise.php(24): GuzzleHttp\RequestFsm->GuzzleHttp\{closure}(Array)
#5 /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/vendor/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php(55): React\Promise\FulfilledPromise->then(Object(Closure), NULL, NULL)
Forum theme /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/vendor/guzzlehttp/guzzle/src/Message/FutureResponse.php(43): GuzzleHttp\Ring\Future\CompletedFutureValue->then(Object(Closure), NULL, NULL)
Install Docs-ISPconfig /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/vendor/guzzlehttp/guzzle/src/RequestFsm.php(135): GuzzleHttp\Message\FutureResponse::proxy(Object(GuzzleHttp\Ring\Future\CompletedFutureArray), Object(Closure))
Advertising forum? /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/vendor/guzzlehttp/guzzle/src/Client.php(233): GuzzleHttp\RequestFsm->__invoke(Object(GuzzleHttp\Transaction))
#9 /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/vendor/guzzlehttp/guzzle/src/Client.php(218): GuzzleHttp\Client->send(Object(GuzzleHttp\Message\Request))
Addon Store Development /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/src/Handlers/XmwsRequest.php(91): GuzzleHttp\Client->post('domains', Array)
Going live in two weeks time! /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/src/Senitor.php(130): Ballen\Senitor\Handlers\XmwsRequest->send()
Important and Useful Links and Sites /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/sentora.php(239): Ballen\Senitor\Senitor->send()
Premium support subscription /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/sentora.php(381): sendSenitorRequest(Array, 'domains', 'CreateDomain', Array)
#14 /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/vendor/whmcs/whmcs-foundation/lib/Module/AbstractModule.php(0): sentora_CreateAccount(Array)
#15 /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/vendor/whmcs/whmcs-foundation/lib/Module/Server.php(0): WHMCS\Module\AbstractModule->call()
#16 /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/includes/modulefunctions.php(0): WHMCS\Module\Server->call()
More progress updates and 'trojan spike' joins the team! /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/includes/modulefunctions.php(0): ModuleCallFunction()
#18 /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/includes/orderfunctions.php(0): ServerCreateAccount()
A few questions /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/admin/orders.php(0): acceptOrder()
Request: FTP username@domain.tls {main}
Debug string from Senitor:
1
The way I understand that is that Sentora is throwing a 500 error after you create the domain on your script.
Is that correct? and how would I fix it?
@[pomtom44] Sorry, I've been a bit busy past couple days.
Yeah, Sentora errors when/after creating the domain, try enabling PHP error reporting (by making sure that display_errors is set to "On") and see if the module log contains more info after running the creation with it enabled, or if the error is in the sentora log located in /var/sentora/log/sentora-error.log
Hey Rynoxx
Iv enabled PHP logging, and im still getting the same errors.
500 error on screen
/var/sentora/log/sentora-error.log
Code:[Sat Oct 22 10:43:44.968544 2016] [:error] [pid 19082] [client 127.0.0.1:37640] PHP Fatal error: Call to a member function GetControllerRequest() on null in /etc/sentora/panel/dryden/ctrl/auth.class.php on line 190
And the same Module Log as previous
Update*
I added some logging to the auth class there the error was coming from as above (The hashed line is the one the error is referencing)
PHP Code:static function CurrentUserID()
{
global $controller;
error_log("Start\n", 3, "/tmp/my-errors.log");
#$id = $controller->GetControllerRequest('USER', 'zpuid');
error_log($id . "\n", 3, "/tmp/my-errors.log");
return $controller->GetControllerRequest('USER', 'zpuid');
}
When I load the Sentora panel I get a ton of logs saying "start 1" showing my logging is working
However when I send the request from WHMCS I dont get a ID number logged.
Im going to try trace it back and do some more custom logging to see if I can see where its going wrong.
Another Update
Looking at the message displayed on screen by WHMCS it appears that the final number is the userID created in sentora of the account owning the domain
In the example below its 47 (It was 30 in the earlier message)
Code:URL/admin/orders.php?action=view&id=5&activate=true
1101 success 1101 47 expression
@[pomtom44] Awesome, thanks for doing some digging on your own
After some more thorough testing on my side, it seems like the error only occurs when the user id isn't sent from WHMCS (even an invalid user id or previously existing user id works).
Although judging by the screenshot of the module log you sent earlier this shouldn't be an issue in this case.
Can you confirm that when running whmcs234 the "domains.createdomain" action has 'uid' => 'XX' in the request? (In the WHMCS module log)
Rynoxx
Yes the ID is being sent
Heres the full debug logs just for reference
whmcs234.createclient
Code:
Request
Array
(
[resellerid] => 1
[packageid] => Olly
[groupid] => 3
[username] => ollyconz
[fullname] => Oliver
[email] => XXXXXXXX
[address] => XXXXXXX
[postcode] => XXXX
[password] => XXXX
[phone] => XXXX
[sendmail] => 0
[emailsubject] => 0
[emailbody] => 0
)
Response
success
whmcs234.getuserid
Code:
Request
Array
(
[username] => ollyconz
)
Response
Array
(
[uid] => 48
)
whmcs234.createdomain
Code:
Request
Array
(
[uid] => 48
[domain] => olly.co.nz
[destination] =>
[autohome] => 1
)
Response
Caught exception: Server error response [url] https://52.37.245.73/api/domains [status code] 500 [reason phrase] Internal Server Error
/var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/vendor/guzzlehttp/guzzle/src/Subscriber/HttpError.php(33): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Message\Request), Object(GuzzleHttp\Message\Response))
Forum Add-ons and Usage /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/vendor/guzzlehttp/guzzle/src/Event/Emitter.php(109): GuzzleHttp\Subscriber\HttpError->onComplete(Object(GuzzleHttp\Event\CompleteEvent), 'complete')
MySupport Addon /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/vendor/guzzlehttp/guzzle/src/RequestFsm.php(91): GuzzleHttp\Event\Emitter->emit('complete', Object(GuzzleHttp\Event\CompleteEvent))
Test of MySupport MOD /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/vendor/guzzlehttp/guzzle/src/RequestFsm.php(132): GuzzleHttp\RequestFsm->__invoke(Object(GuzzleHttp\Transaction))
#4 /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/vendor/react/promise/src/FulfilledPromise.php(24): GuzzleHttp\RequestFsm->GuzzleHttp\{closure}(Array)
#5 /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/vendor/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php(55): React\Promise\FulfilledPromise->then(Object(Closure), NULL, NULL)
Forum theme /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/vendor/guzzlehttp/guzzle/src/Message/FutureResponse.php(43): GuzzleHttp\Ring\Future\CompletedFutureValue->then(Object(Closure), NULL, NULL)
Install Docs-ISPconfig /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/vendor/guzzlehttp/guzzle/src/RequestFsm.php(135): GuzzleHttp\Message\FutureResponse::proxy(Object(GuzzleHttp\Ring\Future\CompletedFutureArray), Object(Closure))
Advertising forum? /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/vendor/guzzlehttp/guzzle/src/Client.php(233): GuzzleHttp\RequestFsm->__invoke(Object(GuzzleHttp\Transaction))
#9 /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/vendor/guzzlehttp/guzzle/src/Client.php(218): GuzzleHttp\Client->send(Object(GuzzleHttp\Message\Request))
Addon Store Development /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/src/Handlers/XmwsRequest.php(91): GuzzleHttp\Client->post('domains', Array)
Going live in two weeks time! /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/lib/senitor/src/Senitor.php(130): Ballen\Senitor\Handlers\XmwsRequest->send()
Important and Useful Links and Sites /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/sentora.php(239): Ballen\Senitor\Senitor->send()
Premium support subscription /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/modules/servers/sentora/sentora.php(381): sendSenitorRequest(Array, 'domains', 'CreateDomain', Array)
#14 /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/vendor/whmcs/whmcs-foundation/lib/Module/AbstractModule.php(0): sentora_CreateAccount(Array)
#15 /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/vendor/whmcs/whmcs-foundation/lib/Module/Server.php(0): WHMCS\Module\AbstractModule->call()
#16 /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/includes/modulefunctions.php(0): WHMCS\Module\Server->call()
More progress updates and 'trojan spike' joins the team! /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/includes/modulefunctions.php(0): ModuleCallFunction()
#18 /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/includes/orderfunctions.php(0): ServerCreateAccount()
A few questions /var/sentora/hostdata/zadmin/https_html/billing_host4_cheap/admin/orders.php(0): acceptOrder()
Request: FTP username@domain.tls {main}
Debug string from Senitor:
1