hello.
i used own php script to connect to PVE. for now auth is ok, but in any post it returns "
"
for example:
the same request to:
works fine... (actually i get token and cookie)
what changed?
not working on PVE 7.4.17 and PVE 8.1.3 after host updates
P.S. there is no errors in script. it was copied from my src and changed like IPs, names,etc. so there can be mistakes)
i used own php script to connect to PVE. for now auth is ok, but in any post it returns "
Code:
HTTP/1.1 501 chunked transfer encoding not supportedCache-Control: max-age=0Connection: closeDate: Fri, 12 Jan 2024 16:34:33 GMTPragma: no-cacheServer: pve-api-daemon/3.0Expires: Fri, 12 Jan 2024 16:34:33 GMT
for example:
PHP:
curl_setopt($ch, CURLOPT_URL,"https://myhost:8006/api2/json/nodes/ps116/qemu/118/status/stop")
curl_setopt($ch, CURLOPT_HTTPHEADER, ["CSRFPreventionToken: {$mytokenhere}"]);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIE, "PVEAuthCookie="{$mycookiedata}");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_exec($ch)
the same request to:
PHP:
curl_setopt($ch, CURLOPT_URL,"https://myhost:8006/api2/json/access/ticket");
$pf = 'username='. urlencode($this->username).'@pve&password='.urlencode($this->password);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $pf);
curl_exec($ch)
what changed?
not working on PVE 7.4.17 and PVE 8.1.3 after host updates
P.S. there is no errors in script. it was copied from my src and changed like IPs, names,etc. so there can be mistakes)
Last edited: