Topic on Extension talk:OpenID

[SOLVED] Call to a member function getAssociation() on a non-object in ...Consumer.php on line 945

7
Summary by Wikinaut

filed as Bug 36924 - Call to a member function getAssociation() on a non-object in ...Consumer.php on line 945

Solved. This issue was caused by openbase_dir. You assume that you can write to /tmp, in today's hosting market this is no always the case. I suggest in the future you use sys_get_temp_dir. The easy work around is to set $wgOpenIDServerStorePath and $wgOpenIDConsumerStorePath to a dir that you do have write perms to.

Rajjder (talkcontribs)

Hey!

Mediawiki: 1.19 PHP Version 5.3.10 OpenID: 1.001

The problem is when I try to login with google-account. After the request of which email I want to use I get redirected to another page where I see this:

Fatal error: Call to a member function getAssociation() on a non-object in ...Consumer.php on line 945

I've also tried the extension on mediawiki 1.18

Does anyone have a solution for this?

Regards Anders

Wikinaut (talkcontribs)

Please check and make sure that you have also the correct version of php-OpenID library. Most likely you are using and incorrect outdated version of the library.

I suggest you delete all files in the subdirectory $IP/extension/OpenID, and that subdirectoy itself, and you make a fresh installation of version 1.004. Follow the installation instructions and apply the "make" (makefile) to download the correct library from https://github.com/Wikinaut/php-openid/tree/mw-extension-openid . You can inspect the library code on GitHub and the extension code itself on MediaWiki SVN http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/OpenID/ , see readme files, in case you want to study it.

Rajjder (talkcontribs)

I've now made a fresh installation with version 1.004 by following the instructions. Unfortunately the problem remains with the exact error message as I posted before.

Wikinaut (talkcontribs)
Wikinaut (talkcontribs)

I already answered you directly. The gmd functions are apparently missing in your installation. This is explained for example on the main page and here on top in the checklist 2: PHP modules, which the extension requires.

Problem appears to be user-specific (missing gmd); issue closed.

76.171.151.173 (talkcontribs)

Actually no, this issue is caused by openbase_dir. You assume that you can write to /tmp, in today's hosting market this is no always the case. I suggest in the future you use sys_get_temp_dir.

The easy work around is to set:

$wgOpenIDServerStorePath

and

$wgOpenIDConsumerStorePath

to a dir that you do have write perms to.

Wikinaut (talkcontribs)

Thank you very much; I will change the code in the next version to implement this as default.

Reply to "[SOLVED] Call to a member function getAssociation() on a non-object in ...Consumer.php on line 945"