cPanel fileman module mkfile function (api) not working.
Opened this issue · 0 comments
sampat-rebelute commented
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?