API Gives a white page

Questions regarding the API
Application Programming Interface
CLAR101
Posts: 10
Joined: Thu Jul 14, 2016 2:27 pm

API Gives a white page

Postby CLAR101 » Thu Nov 03, 2016 9:39 pm

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=admin&password=######&cmd=v-add-user&arg1=user&arg2=123456&arg3=demo%40demo.dem&arg4=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

syntac
Posts: 1
Joined: Sat Nov 12, 2016 8:01 pm

Re: API Gives a white page

Postby syntac » Sat Nov 12, 2016 8:03 pm

Same problem here, i'm nothing find solutions to fix that problem.

CLAR101
Posts: 10
Joined: Thu Jul 14, 2016 2:27 pm

Re: API Gives a white page

Postby CLAR101 » Mon Nov 14, 2016 11:06 am

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

shushry
Posts: 1
Joined: Tue Nov 15, 2016 8:23 am

Re: API Gives a white page

Postby shushry » Tue Nov 15, 2016 8:26 am

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.

fedekrum
Posts: 31
Joined: Mon May 12, 2014 7:45 pm
Location: Argentina

Re: API Gives a white page

Postby fedekrum » Wed Dec 14, 2016 10:17 am

Same thing here.
I am not able to use de web API at all.

Best regards.

CLAR101
Posts: 10
Joined: Thu Jul 14, 2016 2:27 pm

Re: API Gives a white page

Postby CLAR101 » Thu Dec 15, 2016 2:00 am

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?


Return to “Scripting / API”



Who is online

Users browsing this forum: No registered users and 2 guests

cron