maheshbisen

Registered
Aug 31, 2018
4
1
3
Gondia
cPanel Access Level
Root Administrator
Hello,

Anyone knows alternate script for creating FTP accounts using PHP script?

Code:
 $xmlapi->api2_query($account, "Ftp", "addftp", array(
        'user'    => $_REQUEST['user'],
        'pass'    => $_REQUEST['pwd'],
        'quota'   => $_REQUEST['qt'],
        'homedir' => '/home/xxx/xxxx/ftp_dirs/'.$_REQUEST['homedir']));
 

maheshbisen

Registered
Aug 31, 2018
4
1
3
Gondia
cPanel Access Level
Root Administrator
Thank you for your prompt response. I have tried this UAPI but getting following error. It will be really helpful if you can provide example of the simple addFtp method.

Code:
[31-Aug-2018 20:00:09 UTC] PHP Fatal error:  Uncaught exception 'RuntimeException' with message 'There was a problem fetching the env variablecontaining the path to the socket' in /usr/local/cpanel/php/cpanel.php:146