Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User can't login through CAS if he doesn't exist on mediawiki already #12

Open
Emi94 opened this issue Feb 10, 2021 · 1 comment
Open

Comments

@Emi94
Copy link

Emi94 commented Feb 10, 2021

If a user logins through CAS for the first time and he doesn't already has a user on mediawiki the web UI throws this:
Fatal exception of type "Error"

And apache2 logs show this

[Wed Feb 10 07:33:29.602817 2021] [php7:warn] [pid 1687451] [client 192.168.0.100:41382] PHP Warning:  session_set_save_handler(): Cannot change save handler when session is active in /var/www/html/extensions/CASAuth/CAS/source/CAS/Client.php on line 1116
[Wed Feb 10 07:33:29.688588 2021] [php7:warn] [pid 1687451] [client 192.168.0.100:41382] PHP Warning:  session_destroy(): Trying to destroy uninitialized session in /var/www/html/extensions/CASAuth/CASAuth.php on line 231
[Wed Feb 10 07:33:29.726882 2021] [php7:warn] [pid 1687451] [client 192.168.0.100:41382] PHP Warning:  session_destroy(): Trying to destroy uninitialized session in /var/www/html/extensions/CASAuth/CASAuth.php on line 244
[Wed Feb 10 07:33:29.823279 2021] [php7:warn] [pid 1687449] [client 192.168.0.100:41388] PHP Warning:  session_set_save_handler(): Cannot change save handler when session is active in /var/www/html/extensions/CASAuth/CAS/source/CAS/Client.php on line 1116

Note: Mediawiki version is 1.35.0, php is 7.4 and $CASAuth["CreateAccounts"]=true; is set

@tpokorra
Copy link

tpokorra commented Oct 6, 2022

I got this error message, not sure if it is the same underlying problem as you have got:

/index.php?title=Spezial:Anmelden&returnto=Hauptseite Error from line 151 of [...]/mediawiki-1.35/extensions/CASAuth/CASAuth.php: Call to undefined method User::setPassword()

see https://www.mediawiki.org/wiki/Release_notes/1.35, look for setPassword: User::setInternalPassword() and User::setPassword(), deprecated in 1.27, have been removed. Use User::changeAuthenticationData() instead.

For an example of replacement see this commit: wikimedia/mediawiki@6edc28d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants