Topic on Project:Support desk

an error "Exception encountered, of type "BadMethodCallException""

16
Summary by Ciencia Al Poder

Missing php-openssl extension

Wujiang2016 (talkcontribs)

when I finished installing the mediawiki and registered users,there is an error "Exception encountered, of type "BadMethodCallException"".

Ciencia Al Poder (talkcontribs)

What MediaWiki version? Clear steps to reproduce?

Wujiang2016 (talkcontribs)

this version is 1.27.0 .

the step is:After the installation is completed, I opened the main page of the site, input the register of user

, entered the user information and submitted, then the error message comed out. only showed the error information

, there was no trace information.May I send you a website which has the picture of the error page? Would you mind checking it and letting me know what the mistake is, please?

109.193.61.189 (talkcontribs)

Hi, same here, fresh installation, no login possible.

TheDJ (talkcontribs)

You could try disabling your installed extensions one by one. Likely one of them is not compatible with 1.27.0

62.32.69.53 (talkcontribs)

I got same error message.

MediaWiki 1.27.0. Php 7.0.9. Debian 7 32bit.

62.32.69.53 (talkcontribs)

I installed 1.26.3, and it works fine at the same configuration.

If its needed i can repeat my installiation and make screenshots of all my actions, and post it here.

62.32.69.53 (talkcontribs)

my version of PHP is 7.0.9 (cgi-fcgi), MySQL5.5.40-0+wheezy1

Ciencia Al Poder (talkcontribs)

Getting a stack trace of the error would be useful. You can usually achieve that by enabling $wgShowExceptionDetails in your LocalSettings.php

Wujiang2016 (talkcontribs)

I solved my problem, I replaced the 1.26.3 version, thanks.

24.104.67.146 (talkcontribs)

Fix is to uninstall 1.27 and install 1.26.3?

87.123.34.134 (talkcontribs)

No, that is not a fix, but only a workaround. And it is important to note that downgrades are not supported. So for most users, going back to 1.26 is no option at all.

MarkAHershberger (talkcontribs)

Could you post the steps to reproduce this? It sounds like you've found a bug.

31.150.136.88 (talkcontribs)

Hi, I enabled the stakestrace and the following appears ...

doesnt look like a bug, more like a missing configuration ...

exception encountered, of type "BadMethodCallException"

[4e134f22f402b314c4edf87b] /onlinehelp/index.php?title=Spezial:Anmelden&returnto=Hauptseite BadMethodCallException from line 438 of /srv/www/kanzlei-soft.de/onlinehelp/includes/session/Session.php: Encryption is not available. You really should install the PHP OpenSSL extension, or failing that the mcrypt extension. But if you really can't and you're willing to accept insecure storage of sensitive session data, set $wgSessionInsecureSecrets = true in LocalSettings.php to make this exception go away.

Backtrace:

87.123.62.168 (talkcontribs)

Please install the OpenSSL extension of PHP. Installing this extension is recommended and this is what you should do to solve the issue.

If you cannot install the OpenSSL extension, please install the mcrypt extension. This will keep your wiki's data secure as well, but it is not the recommended solution.

If both of the above solutions are not possible in your case, then you can still set $wgSessionInsecureSecrets = true; in LocalSettings.php. This will stop the exception from appearing as well. However, setting $wgSessionInsecureSecrets is not recommended. It is insecure. You should not do that! See Manual:$wgSessionInsecureSecrets for more warnings concerning $wgSessionInsecureSecrets!

80.70.232.3 (talkcontribs)

Thank you very much. Helped install php70-openssl on FreeBSD, as you wrote.