Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Backup Scrtipt API Error: Can't call method "login" on an undefined value

Discussion in 'cPanel Developers' started by gigamike, Jun 30, 2015.

  1. gigamike

    gigamike Active Member

    Joined:
    Jan 14, 2008
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    51
    Guys,

    I hope you can help me, i do have a cron that creates a backup of my cpanel using the API
    Fileman i.e.

    require_once $basePath . "/public_html/library/xmlapi-php-master/xmlapi.php";
    $xmlapi = new \xmlapi($source_server_ip);
    $xmlapi->password_auth($cpanel_account,$cpanel_password);
    $xmlapi->set_port($cpanel_port);
    $xmlapi->set_debug(1);
    $api_args = array(
    'passiveftp',
    $ftphost,
    $ftpacct,
    $ftppass,
    $email_notify,
    $ftpport,
    $ftpdirectory
    );
    $xmlapi->set_output('json');
    print $xmlapi->api1_query($cpanel_account, 'Fileman', 'fullbackup', $api_args);

    It works fine before but with the sudden update on WHM i notice i started receiving this error.

    Can't call method "login" on an undefined value

    Any ideas?

    I tried the accounts i set but i can login successfully (cpanel accoung and ftp account)

    Thanks in advance,

    Mike
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,214
    Likes Received:
    1,936
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    Does the issue persist if you temporarily disable any active firewall rules on your system?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice