Hi,
I've recently stumbled upon a problem, i think its something with api2.
Using /usr/local/cpanel/php/cpanel.php class I'm trying to extract zip archive which is placed in home directory of user.
- archive is correct, using Fileman frontend i'm able to extract it correctly
- i'm sending valid details, i've compared them to those which are send with ajax by Fileman
- other calls to API2 works fine
I'm using following code (in a file with .live.php extension) :
Api call returns:
but no data, and archive is not extracted ;( Am I missing something?
I've recently stumbled upon a problem, i think its something with api2.
Using /usr/local/cpanel/php/cpanel.php class I'm trying to extract zip archive which is placed in home directory of user.
- archive is correct, using Fileman frontend i'm able to extract it correctly
- i'm sending valid details, i've compared them to those which are send with ajax by Fileman
- other calls to API2 works fine
I'm using following code (in a file with .live.php extension) :
PHP:
$cp = new CPANEL();
$cp->api2("Fileman","fileop",array(
'destfiles'=>'public_html',
'sourcefiles'=>'/home/acctst/archive.zip',
'op'=>'extract',
'doubledecode'=>'0',
'metadata'=>''
));
PHP:
array(1) {
["cpanelresult"]=>
array(4) {
["apiversion"]=>
string(1) "2"
["event"]=>
array(1) {
["result"]=>
string(1) "1"
}
["func"]=>
string(6) "fileop"
["module"]=>
string(7) "Fileman"
}
}