mgufrone / cpanel-php

CPanel/WHM API for PHP
MIT License
158 stars 91 forks source link

cPanel fileman module mkfile function (api) not working. #24

Open sampat-rebelute opened 7 years ago

sampat-rebelute commented 7 years ago

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?