Remote Access: Upgrading Package Problem!

Gamer4u

Member
Feb 14, 2006
11
0
151
Hi, i've been using WHM Remote Access for a while now and i have been able to use it to a certain extent.
Create Accounts
Terminate Accounts
Change Password
Output Service Status and Server Information
Unsuspend Account

However... i'm having trouble with upgrading accounts :confused: When it gets to the point where the php script should upgrade or downgrade the package in WHM i get a 'WHM Login' form. What am i doing wrong?

The Script works for the above listed functions!

PHP:
// CONNECT STUFF...

// LOTS OF STUFF IN THE FILE

// OTHER FUNCTIONS THAT WORK FINE...


// UPGRADE/DOWNGRADE ACCOUNT
   $do = changepackage($host,$user,$accesshash,$usessl,$user,$package);
if (eregi('Changing max sub domains', $do)) {
 // do other stuff  
}
In whmfunctions:

PHP:
 function changepackage ($host,$user,$accesshash,$usessl,$user,$package) {
    $result = whmreq("/scripts2/upacct?user=${user}&pkg=${package}",$host,$user,$accesshash,$usessl);
    if ($cpanelaccterr != "") { return; } 
    return $result; 
}