Page 1 of 1

API Gives a white page

Posted: Thu Nov 03, 2016 9:39 pm
by CLAR101
Hello VestaCP

So I have started to work on VestaCP for my new service, using the API is a big part of this however when trying to add a user it only shows a white page, I have tried disabling the firewall (bad practice but on a test bench atm) and that did not fix the issue, I have tried a number of different things and yet nothing, I have copied the curl code from the vestaCP docs and that says it worked but did nothing (returns false so assumes correct), I have also tried inserting the http request directly and that only displays a white page

https://46.101.251.55:8083/api/?user=ad ... g4=default

I was hoping you guys could give me insight into the possible cause, if this is firewall related how would I resolve it considering I did disable iptables and added my IP to the vestaCP firewall UI etc and yet still getting the same issue.

I will look forward to your reply, and hope you can help

With Regards
Chris Russell

Re: API Gives a white page

Posted: Sat Nov 12, 2016 8:03 pm
by syntac
Same problem here, i'm nothing find solutions to fix that problem.

Re: API Gives a white page

Posted: Mon Nov 14, 2016 11:06 am
by CLAR101
I heard something about firewall, as I am developing on my local machine and our dev box is in Germany to "simulate" the production hardware, so I assumed it could be my IP being blocked, but adding that to be allowed by the firewall does not fix the issue.

I hope there is a simple fix soon

Re: API Gives a white page

Posted: Tue Nov 15, 2016 8:26 am
by shushry
The index.php in the /api/ directory works off the the $_POST global variable, but adding some debug to the top of that file such as:

print_r($_POST);

Shows that the POST variable is empty, even if a post is made. Somewhere in the configuration, the POST var is being stripped out...

FYI, php://input shows that the data is actually making it there....just the $_POST var is being stripped.

As of yet, not sure why.

Re: API Gives a white page

Posted: Wed Dec 14, 2016 10:17 am
by fedekrum
Same thing here.
I am not able to use de web API at all.

Best regards.

Re: API Gives a white page

Posted: Thu Dec 15, 2016 2:00 am
by CLAR101
I know, this has put a halt on our development as we need VestaCP's API to perform host specific tasks.

Wondering is there any quick work around or is it an easy fix?

Re: API Gives a white page

Posted: Sun Mar 22, 2020 8:06 am
by fertooos
Have you found a solution to this issue? If anybody managed to cope with this, please let us know your method. I cannot fix it by myself. And I do not know any other ways. I hope somebody can help to overcome this problem. I am Colorado https://areaphonecodes.com/united-states/720. You may also contact me directly with your ideas. Thanks!