Why doesn't Google OpenID provider work with PHP-OpenId on my server?

血红的双手。 提交于 2019-12-02 19:11:40

问题


I'm using PHP-OpenId 2.1.3 which I've unzipped on my server here (this is the consumer example that comes with PHP-OpenId). When I enter the Google OpenId url (https://www.google.com/accounts/o8/id) and submit I get a blank screen.

When I try the exact same example code on the PHP-OpenId website here with the same URL it works fine.

I don't understand what I'm doing wrong. The only thing I can think of is that somehow Google does not want to work with my server.

Any ideas how to make this work?


回答1:


If it breaks for Google and Yahoo but works for certain other providers, it's likely the setup for making HTTPS requests is borked on your PHP server. Check to make sure you have the ca-certificates package installed.




回答2:


ketrun is right, I had a similar problem. After I installed the ca-certificates package, everything was fine, but when there is a problem with https requests, PHP Openid returns an error (invalid openid), not a blank screen.

Be sure to check the detect.php file from the examples dir and discover.php to check your OpenID URLs.



来源:https://stackoverflow.com/questions/818063/why-doesnt-google-openid-provider-work-with-php-openid-on-my-server

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!