HTTP Crashing server
#1

pawn Code:
format(string, 300, "username=%s&email=%s&email_confirm=%s&new_password=%s&password_confirm=%s&pf_in_game_name=%s&qa_answer=n", PlayerName(playerid), inputtext, inputtext, PlayerInfo[playerid][Ppassword], PlayerInfo[playerid][Ppassword], PlayerName(playerid));
            HTTP(playerid, HTTP_POST, "mawebsite.com/forum/ucp.php?mode=register", string, "OnForumRegister");
Crashes the server :C
Reply
#2

What does the server log says?
Reply
#3

I'm unsure as to whether this is related to the crash, but as far as I'm aware the function adds its parameter with a preceding question mark, so already having a pre-existing URL parameter will cause some problems.

Try this:
pawn Code:
format(string, 300, "?mode=register&username=%s&email=%s&email_confirm=%s&new_password=%s&password_confirm=%s&pf_in_game_name=%s&qa_answer=n", PlayerName(playerid), inputtext, inputtext, PlayerInfo[playerid][Ppassword], PlayerInfo[playerid][Ppassword], PlayerName(playerid));
HTTP(playerid, HTTP_POST, "mawebsite.com/forum/ucp.php", string, "OnForumRegister");
Possible PHP Issue: In "ucp.php", if it checks for "$_GET['mode'] == register" through a $_GET variable, replace $_GET with $_REQUEST and it will still work as intended.
Reply
#4

Quote:
Originally Posted by Ash.
View Post
...
Just tried that, still crashes :/
My forum system is phpbb so I'm not sure what's in the ucp.php but i'll have a look
Reply
#5

Quote:
Originally Posted by thefatshizms
View Post
Just tried that, still crashes :/
My forum system is phpbb so I'm not sure what's in the ucp.php but i'll have a look
Try printing out what 'string' becomes, it could be that it becomes too large for the 300 cell size you've given it!
Reply
#6

I've made the size bigger, it now doesn't crash the server but doesn't sign me up on the forum
Reply
#7

Quote:
Originally Posted by thefatshizms
View Post
I've made the size bigger, it now doesn't crash the server but doesn't sign me up on the forum
What data is returned from the registration page? You might need to create your own PHP script to do this for you, considering I can't imagine the PHPBB boards to be designed for this... (though, I can't say I've checked either)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)