KuroiNekoDev

Registered
Mar 3, 2018
4
0
1
Nowhere
cPanel Access Level
Reseller Owner
Hi, I created a little script for manage email accounts from my reseller hosting...

This script use the cPanel UAPI Library created by N1ghteyes (github.com/N1ghteyes/cpanel-UAPI-php-class) and works very well...

Recently a friend tried to use it in his VPS (from Mochahost), but It doesn't work...

So we created a simple file for try the connection (below is the code)

PHP:
<?php
        require 'class/cpaneluapi.php';
        require 'whm_config.php'; // Here I define the constants from the server as User, Pass & IP


        $WHM = new cpanelAPI(WHM_user, WHM_pass, WHM_svIP);
        $list_main_domains = $WHM->uapi->Resellers->list_accounts();

        var_dump($list_main_domains['data']);

?>
But always it return this:
D:\xampp\WHMEmailManager\api_test.php:10:null


Why happend this? (We are trying using the "root" account)

And this is my script (in Spanish): github.com/KuroiNekoWitch/WHMEmailManager
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,220
463