Voting API error

Status
Not open for further replies.

Nevada

Member
Oct 16, 2011
63
3
My voting API was working fine until yesterday when it suddenly stopped working. People click to vote, they click the correct image then it takes them back to api.php and when you click the vote button again nothing happens. I have it set up to redirect to my client however this isn't happening. Would appreciate any help.
Thanks
 

Nevada

Member
Oct 16, 2011
63
3
URL is
I've managed to get it half working by setting api url to yabbo.co.uk/client instead of /api.php as if I set it as /api.php it redirect to /api.php after voting as if you never voted and then nothing happens when you click vote again. The problem is that every time you enter the client now youre asked to vote even if you have already. The problem must be that the API isn't redirecting people to the client if it detects that they've voted already.
 

RastaLulz

fight teh power
Staff member
May 3, 2010
3,934
3,932
That's odd. Did you edit anything other than the config file? It seems that it's always returning the same value.

Also, do you have cURL installed on your web server?

You can check here if you voted:
 

Nevada

Member
Oct 16, 2011
63
3
I don't believe I have cURL installed and no all I edited was my thehabbos username and api location. I've even tried using earlier releases but no luck.
 

RastaLulz

fight teh power
Staff member
May 3, 2010
3,934
3,932
I don't believe I have cURL installed and no all I edited was my thehabbos username and api location. I've even tried using earlier releases but no luck.
Set $CONFIG['Curl_Enabled'] to 0, inside config.php.
 

Nevada

Member
Oct 16, 2011
63
3
Done that and still getting issues, i've set it all up how it's supposed to be now with api location correct and curl set to 0. If you go to my site now and click the "Enter Hotel" button under users online (this is the one linked to api.php) then you'll see the issue. Once you vote you're taken back to vote.php and you can't click to vote again.
 

Nevada

Member
Oct 16, 2011
63
3
Yes, we are. Could this be causing it? If so, is there anyway to fix this without removing cloudflare?
 

RastaLulz

fight teh power
Staff member
May 3, 2010
3,934
3,932
Add the following code at the top config.php:
PHP:
if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) { $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; }
 
Status
Not open for further replies.

Users who are viewing this thread

Top