By Marcus Palmer on Tuesday, 24 February 2015
Posted in General Issues
Replies 14
Likes 0
Views 2.4K
Votes 0
When i try to login using Facebook sign in button i get a 500 error.

Checked Server and got error: "CSRF state token does not match one provided."
HI Marcus,

I am sorry for the late reply.
Can you provide us with your FTP access in order to further debug this issue.

Please advise.
·
Tuesday, 24 February 2015 11:06
·
0 Likes
·
0 Votes
·
0 Comments
·
Add FTP Access below.....

Let me know if you have any problems accessing !
·
Tuesday, 24 February 2015 18:42
·
0 Likes
·
0 Votes
·
0 Comments
·
If you have any problems accessing ftp i have installed eXtoplorer to view amend download files directly through Joomla Backend --> Components-->eXtoplorer

Thanks
·
Wednesday, 25 February 2015 07:18
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Marcus,

I am sorry for the late reply.
Currently we're still investigating this issue on your site. This reply is just to inform you that we didn't missed your thread and I will get back to you as soon as I found the cause of the issue.

Please advise.
·
Wednesday, 25 February 2015 13:23
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

I am sorry for the late reply.
Can you give us the location to your error log file so that we can debug this issue much better. We need this access in order for us to see what is the generated error and try to resolves this issue.

By the way, I have done some research on this issue, and I have found out this article which suggested to taking out curl_exec in disable_functions in php.ini. You can try go to your php.ini file, find disable_functions and remove curl_exec from the list. Can you give this a try and see if this resolves your issue.
For further understanding, please do read here.

Please do update us back on this and I am sorry for the inconvenience caused.
·
Wednesday, 25 February 2015 16:23
·
0 Likes
·
0 Votes
·
0 Comments
·
Tried everything and no fix, This is frustrating as I'm at the end of design and good to go just these small things stopping me from launching?

Going to send Error log shortly

Clarify added this to base_facebook.php

protected function getCode() {
$server_info = array_merge($_GET, $_POST, $_COOKIE);

if (isset($server_info['code'])) {
if ($this->state !== null &&
isset($server_info['state']) &&
$this->state === $server_info['state']) {

// CSRF state has done its job, so clear it
$this->state = null;
$this->clearPersistentData('state');
return $server_info['code'];
} else {
self::errorLog('CSRF state token does not match one provided.');
return false;
}
}

return false;
}



and looked into php.ini and curl is not in disabled_functions....
·
Wednesday, 25 February 2015 23:16
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Marcus,

I am sorry for the late reply and thanks for the update.
About the code you put in the base_facebook.php, I have already tried that and still the issue is not fix. I am sorry for the inconvenience caused.

We are still investigating this issue. Can you give us the location to your error log file so that we can debug this issue much better. We need this access in order for us to see what is the generated error and try to resolves this issue.

looking forward to hear from you again.
·
Thursday, 26 February 2015 11:39
·
0 Likes
·
0 Votes
·
0 Comments
·
Ok i've sorted this by turning on magic_quotes_gpc=on

For some reason it now works fine;)
·
Thursday, 26 February 2015 21:21
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Marcus,

Thanks for updating us on this. Will take note of this! I believe magic_quotes_gpc might be messing up with the token data that is being transacted by Facebook at the background which causes this issue
·
Friday, 27 February 2015 00:45
·
0 Likes
·
0 Votes
·
0 Comments
·
Ok this starting bugging me as i don't think setting Magic Quotes is a requirement as this should be ok in php.ini

SO

i turned it off and it still worked "Confused"
So i went into my php settings to start removing customer extensions and settings..

I removed session.save_path= Same still worked
I basically got to error_log= "I then remembered Mohd Yasser asking for error log"
I removed error_log= from custom php settings and BINGOOOOO facebook token error appeared like a crying baby in the night!

I searched high and low but could find where log was writing - so reset this with custom error_log={DOCROOT}/tmp/myfile.log

guess what this now works!

So my problem was error_log= had nowhere to write to!

Thought i'd share this as it was bugging the hell out of me!!!!!
·
Tuesday, 03 March 2015 23:25
·
0 Likes
·
0 Votes
·
0 Comments
·
Hm, odd as I don't see why error_log causes Facebook to fail
·
Tuesday, 03 March 2015 23:32
·
0 Likes
·
0 Votes
·
0 Comments
·
Exactly
·
Wednesday, 04 March 2015 00:47
·
0 Likes
·
0 Votes
·
0 Comments
·
If you want to do some further testing with this can echo phpinfo and turn it on and off (For me this is bizzare)
·
Wednesday, 04 March 2015 00:48
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Marcus,

I am sorry for the late reply.
Can you provide us back the backend access and FTP access so that we can do further testing. It is really odd that Facebook need the error log to write unless it do hit error. I am interested to know why.

Looking forward to hear from you again.
·
Wednesday, 04 March 2015 13:38
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post