mgufrone / cpanel-php

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

Forbidden Access denied error #4

Closed louposk closed 9 years ago

louposk commented 9 years ago

Hello, I am trying the example:

$cpanel = new \Gufy\CpanelPhp\Cpanel([ 'host' => 'https://xx.xx.xx.xx:2087', // ip or domain complete with its protocol and port 'username' => 'root', // username of your server, it usually root. 'auth_type' => 'password', // set 'hash' or 'password' 'password' => 'my_password', // long hash or your user's password ]);

$accounts = $cpanel->listaccts(); // it will returned as array

when i var_dump the $accounts i get the following: Client error response [url] https://xx.xx.xx.xx:2087/json-api/listaccts [status code] 403 [reason phrase] Forbidden Access denied

What am i doing wrong? Is there something else i should do?

Thanks

mgufrone commented 9 years ago

Sorry @louposk , it appears it's a fatal error. I will fix this soon.

mgufrone commented 9 years ago

please update to version v1.0.5, i have already test it locally and get successful response.

louposk commented 9 years ago

OK thanks now it works great.

brandonjjon commented 8 years ago

I have version 1.0.5 and still receive this same error. The root/hash method works fine, but for security reasons, I would like to be able to login to user account with password method. How can we get this to work?

Thanks