简体   繁体   English

Facebook PHP SDK getUser()CKR_DEVICE_ERROR

[英]Facebook PHP SDK getUser() CKR_DEVICE_ERROR

I have used the Facebook PHP SDK to create a Facebook-login for my webpage. 我已使用Facebook PHP SDK为我的网页创建Facebook登录。 And it worked as it should. 它按预期工作。

Some time between yesterday and last thursday it suddenly stopped working. 从昨天到最后一个星期四的某个时间,它突然停止工作。 No changes have been made to the code. 尚未对代码进行任何更改。 To root out any errors I might have made I created a testing script, with only the basics for logging in - actually just copied the login-example from the SDK. 为了消除所有错误,我可能创建了一个测试脚本,该脚本仅包含登录的基础知识-实际上只是从SDK复制了登录示例。

This script showed the same problem. 该脚本显示了相同的问题。 A bit of digging here on StackOverflow gave me the idea to print the array from the exception thrown in fundtion getAccessTokenFromCode() in base_facebook.php. 在StackOverflow上进行的一些挖掘使我想到了从base_facebook.php中的Fundget getAccessTokenFromCode()中引发的异常中打印数组的想法。

The array contains this: 该数组包含以下内容:

FacebookApiException Object ( 
                [result:protected] => Array ( 
                [error_code] => 35 
                [error] => Array ( 
                        [message] => A PKCS #11 module returned CKR_DEVICE_ERROR, indicating that a problem has occurred with the token or slot. 
                        [type] => CurlException 
                       ) 
                ) 
                [message:protected] => A PKCS #11 module returned CKR_DEVICE_ERROR, indicating that a problem has occurred with the token or slot. 
                [string:Exception:private] => [code:protected] => 35

I'm simply at a loss here about where to look, so any hints or help would be appreciated a lot. 我对这里的位置不知所措,因此任何提示或帮助将不胜感激。

Oh happy day! 哦,快乐的一天!

The server was running a Fedora 19. I noticed that I could not update to the latest version of CURL, so just to root out any possibilities I decided to update to Fedora 20. 该服务器正在运行Fedora19。我注意到我无法更新到最新版本的CURL,因此,为了消除我决定更新到Fedora 20的所有可能性。

And this fixed the problem. 这就解决了问题。 I'm guessing something broke in the old version of CURL, and was only fixed in the Fedora 20 available version. 我猜测CURL的旧版本中有问题,并且仅在Fedora 20可用版本中得到修复。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM