develop web ui have trouble


Well-Known Member
Apr 23, 2019
we write a pxomoxy web ui
i no understand
is what?
public function __construct ($hostname, $username, $realm, $password, $port = 8006, $verify_ssl = false) {
if (empty($hostname) || empty($username) || empty($realm) || empty($password) || empty($port)) {
throw new PVE2_Exception("Hostname/Username/Realm/Password/Port required for PVE2_API object constructor.", 1);
// Check hostname resolves.
if (gethostbyname($hostname) == $hostname && !filter_var($hostname, FILTER_VALIDATE_IP)) {
throw new PVE2_Exception("Cannot resolve {$hostname}.", 2);
// Check port is between 1 and 65535.
if (!filter_var($port, FILTER_VALIDATE_INT, ['options' => ['min_range' => 1, 'max_range' => 65535]])) {
throw new PVE2_Exception("Port must be an integer between 1 and 65535.", 6);
// Check that verify_ssl is boolean.
if (!is_bool($verify_ssl)) {
throw new PVE2_Exception("verify_ssl must be boolean.", 7);

$this->hostname = $hostname;
$this->username = $username;
$this->realm = $realm;
$this->password = $password;
$this->port = $port;
$this->verify_ssl = $verify_ssl;
There are different realms available:
- pam
- pve
- e.g. ldap if configured

root does always have pam as realm. Depending on how you created your users, you most probable have to add pve as a realm there.

For future posts: please add CODE tags to properly format your code.
we company now open web system face proxmox.
fulture need many support.


The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!