cpanel-php icon indicating copy to clipboard operation
cpanel-php copied to clipboard

cPanel fileman module mkfile function (api) not working.

Open sampat-rebelute opened this issue 8 years ago • 0 comments

i am calling the cPanel mkfile api but every time it throws some errors like cURL error 28: Operation timed out after 0 milliseconds with 0 out of 0 bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html).

I am calling simple package functions but it throws curl errors so not getting where it comes from?

source code $cPanel = new Cpanel([ 'host' => $hostUrl , 'username' => $username, 'auth_type' => 'hash', 'password' => $password ]);

    $data = $cPanel->cpanel('Fileman', 'mkfile', $username, [
        'name'        => 'new_file.txt',
        'path'        => '/home/myfolder/public_html/',
        'permissions' => '0777',
    ]);
    print_r($data);

Please help me to resolve or any correction?

sampat-rebelute avatar Aug 21 '17 12:08 sampat-rebelute