Delatory

Registered
Apr 18, 2006
4
0
151
I've got this code to try and access the WHM and do stuff via a billing system which im making but when i keep trying the code it always comes up with an error of :
PHP:
Warning: main(): open_basedir restriction in effect. File(/wwwhsho/local/cpanel/Cpanel/Accounting.php.inc) is not within the allowed path(s): (/home/wwwhsho/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/wwwhsho/public_html/viewaccounts.php on line 2

Warning: main(/wwwhsho/local/cpanel/Cpanel/Accounting.php.inc): failed to open stream: Operation not permitted in /home/wwwhsho/public_html/viewaccounts.php on line 2

Warning: main(): open_basedir restriction in effect. File(/wwwhsho/local/cpanel/Cpanel/Accounting.php.inc) is not within the allowed path(s): (/home/wwwhsho/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/wwwhsho/public_html/viewaccounts.php on line 2

Warning: main(/wwwhsho/local/cpanel/Cpanel/Accounting.php.inc): failed to open stream: Operation not permitted in /home/wwwhsho/public_html/viewaccounts.php on line 2

Fatal error: main(): Failed opening required '/wwwhsho/local/cpanel/Cpanel/Accounting.php.inc' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/wwwhsho/public_html/viewaccounts.php on line 2
This is the code im using to try and get it to work
PHP:
<?php
require('/wwwhsho/local/cpanel/Cpanel/Accounting.php.inc');
$host = "localhost";
$user = "wwwhsho";
$accesshash = 'Access Hash code';

$accts = listaccts($host,$user,$accesshash,0);
print_r($accts);
$pkgs = listpkgs($host,$user,$accesshash,0);
print_r($pkgs);
?>
 

Delatory

Registered
Apr 18, 2006
4
0
151
And how do i do that because there is no security page in the menu. unless its in addons called Mod Security but you cant change anything