Calling Cpanel UAPI method -
i have following simple script list ftp accounts unable work have following error tries call constructor include '/usr/local/cpanel/php/cpanel.php'; $cpanel = new cpanel(); // connect cpanel - once. // list ftp account information. $list_ftp_accts = $cpanel->uapi('ftp', 'list_ftp'); echo "<pre>"; print_r($list_ftp_accts); fatal error: uncaught exception 'runtimeexception' message 'there problem fetching env variable containing path socket' in /usr/local/cpanel/php/cpanel.php:146 stack trace: #0 /public_html/uapi.php(4): cpanel->__construct() #1 {main} thrown in /usr/local/cpanel/php/cpanel.php on line 146 line 146 in cpanel.php $socketfile = getenv('cpanel_phpconnect_socket'); according a post on cpanel forums , can use liveapi within cpanel's document root, meaning code need in either /usr/local/cpanel/base/frontend/ or /usr/local/cpanel/base/3rdparty/ . ran while trying use ...