Some of the call works (getAccountInfo, getDomainInfo) but others don't, like GetAllAccounts.
Here's that part of code:
Code: Select all
<?php
$mUsername = '*****@*******.com';
$mPassword = '**************************';
$api = \Zimbra\Admin\AdminFactory::instance('https://********:7071/service/admin/soap');
$logauth = $api->auth($mUsername, $mPassword);
$mDomain = '*******';
$domain = new \Zimbra\Admin\Struct\DomainSelector(\Zimbra\Enum\DomainBy::VIRTUAL_HOSTNAME(), $mDomain);
$server = new \Zimbra\Admin\Struct\ServerSelector(\Zimbra\Enum\ServerBy::SERVICE_HOSTNAME(), $mDomain);
$myVar= $api->getallaccounts($domain, $server);
Fatal error: Uncaught exception 'GuzzleHttp\Exception\ServerException' with message 'Server error: `POST https://*************:7071/service/admin/soap` resulted in a `500 Server Error` response: <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope ... r><context xmlns="urn:zimbra"><change tok (truncated...) ' in /var/www/ZimbraApi/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113 Stack trace: #0 /var/www/ZimbraApi/vendor/guzzlehttp/guzzle/src/Middleware.php(65): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response)) #1 /var/www/ZimbraApi/vendor/guzzlehttp/promises/src/Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response)) #2 /var/www/ZimbraApi/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array) #3 /var/www/ZimbraApi/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Pro in /var/www/ZimbraApi/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 113
What can I do?