Comments (5)
Make sure you call wfLoadExtension after you defined the settings. The SSO process happens very early in the MediaWiki startup and if the settings are missing, it can cause this.
from smf-mw-auth.
Hi again,
First off, thank you very much for your response. I apologize for not getting back to you in a timely fashion as I need additional help. I had COVID-19, and it really did me in. Anyway, I decided to downgrade SMF 2.1 RC3 to SMF 2.0.18. Everything else (Mediawiki, PHP, etc) is the same version as stated above.
So, now my LocalSettings.php is:
# This file was automatically generated by the MediaWiki 1.35.1
# installer. If you make manual changes, please keep track in case you
# need to recreate them later.
#
# See includes/DefaultSettings.php for all configurable settings
# and their default values, but don't forget to make changes in _this_
# file, not there.
#
# Further documentation for configuration settings may be found at:
# https://www.mediawiki.org/wiki/Manual:Configuration_settings
# Protect against web entry
if ( !defined( 'MEDIAWIKI' ) ) {
exit;
}
wfLoadExtension('ForumSsoProvider');
$wgSMFPath = '/var/www/html';
$wgFSPSoftware = 'smf2.0';
$wgFSPAdminGroups = array(1, 3);
## Uncomment this to disable output compression
# $wgDisableOutputCompression = true;
$wgSitename = "XXXXX";
$wgMetaNamespace = "XXXXX";
## The URL base path to the directory containing the wiki;
## defaults for all runtime URL paths are based off of this.
## For more information on customizing the URLs
## (like /w/index.php/Page_title to /wiki/Page_title) please see:
## https://www.mediawiki.org/wiki/Manual:Short_URL
$wgScriptPath = "/mediawiki";
## The protocol and server name to use in fully-qualified URLs
$wgServer = "https://XXXXXXXXX";
## The URL path to static resources (images, scripts, etc.)
$wgResourceBasePath = $wgScriptPath;
## The URL paths to the logo. Make sure you change this from the default,
## or else you'll overwrite your logo when you upgrade!
$wgLogos = [ '1x' => "$wgResourceBasePath/resources/assets/framed4.png" ];
## UPO means: this is also a user preference option
$wgEnableEmail = true;
$wgEnableUserEmail = true; # UPO
$wgEmergencyContact = "XXXXXXX";
$wgPasswordSender = "XXXXXXX";
$wgEnotifUserTalk = false; # UPO
$wgEnotifWatchlist = false; # UPO
$wgEmailAuthentication = true;
## Database settings
$wgDBtype = "mysql";
$wgDBserver = "localhost";
$wgDBname = "XXXXXX";
$wgDBuser = "XXXXXX";
$wgDBpassword = "XXXXXXX";
# MySQL specific settings
$wgDBprefix = "wiki";
# MySQL table options to use during installation or update
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
# Shared database table
# This has no effect unless $wgSharedDB is also set.
$wgSharedTables[] = "actor";
## Shared memory settings
$wgMainCacheType = CACHE_ACCEL;
$wgMemCachedServers = [];
## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads = true;
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = "/usr/bin/convert";
# InstantCommons allows wiki to use images from https://commons.wikimedia.org
$wgUseInstantCommons = true;
# Periodically send a pingback to https://www.mediawiki.org/ with basic data
# about this MediaWiki instance. The Wikimedia Foundation shares this data
# with MediaWiki developers to help guide future development efforts.
$wgPingback = false;
## If you use ImageMagick (or any other shell command) on a
## Linux server, this will need to be set to the name of an
## available UTF-8 locale. This should ideally be set to an English
## language locale so that the behaviour of C library functions will
## be consistent with typical installations. Use $wgLanguageCode to
## localise the wiki.
$wgShellLocale = "C.UTF-8";
## Set $wgCacheDirectory to a writable directory on the web server
## to make your wiki go slightly faster. The directory should not
## be publicly accessible from the web.
#$wgCacheDirectory = "$IP/cache";
# Site language code, should be one of the list in ./languages/data/Names.php
$wgLanguageCode = "en";
$wgSecretKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
# Changing this will log out all existing sessions.
$wgAuthenticationTokenVersion = "1";
# Site upgrade key. Must be set to a string (default provided) to turn on the
# web installer while LocalSettings.php is in place
$wgUpgradeKey = "XXXXXXXXXXXXXXXX";
## For attaching licensing metadata to pages, and displaying an
## appropriate copyright notice / icon. GNU Free Documentation
## License and Creative Commons licenses are supported so far.
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl = "";
$wgRightsText = "";
$wgRightsIcon = "";
# Path to the GNU diff3 utility. Used for conflict resolution.
$wgDiff3 = "/usr/bin/diff3";
# The following permissions were set based on your choice in the installer
$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['edit'] = false;
## Default skin: you can change the default skin. Use the internal symbolic
## names, ie 'vector', 'monobook':
$wgDefaultSkin = 'smfcurve2';
# Enabled skins.
# The following skins were automatically enabled:
wfLoadSkin( 'smfcurve2' );
# Enabled extensions. Most of the extensions are enabled by adding
# wfLoadExtension( 'ExtensionName' );
# to LocalSettings.php. Check specific extension documentation for more details.
# The following extensions were automatically enabled:
wfLoadExtension( 'CategoryTree' );
wfLoadExtension( 'CiteThisPage' );
wfLoadExtension( 'CodeEditor' );
wfLoadExtension( 'ConfirmEdit' );
wfLoadExtension( 'MultimediaViewer' );
wfLoadExtension( 'Nuke' );
wfLoadExtension( 'OATHAuth' );
wfLoadExtension( 'PageImages' );
wfLoadExtension( 'PdfHandler' );
wfLoadExtension( 'SyntaxHighlight_GeSHi' );
wfLoadExtension( 'VisualEditor' );
wfLoadExtension( 'WikiEditor' );
# End of automatically generated settings.
# Add more configuration options below.
$wgSessionCacheType = CACHE_DB;
As you can see, I changed:
$wgFSPSoftware = 'smf2.1';
to $wgFSPSoftware = 'smf2.0;
And I think I followed your previous instructions by placing this earlier in the file:
wfLoadExtension('ForumSsoProvider'); $wgSMFPath = '/var/www/html'; $wgFSPSoftware = 'smf2.0'; $wgFSPAdminGroups = array(1, 3);
Now the Main page of the wiki is displaying a "Log in" link at the top, and even if I attempt to log in manually, then I get an error message saying:
Incorrect username or password entered. Please try again.
Thank you very much for your time & assistance,
Mike
from smf-mw-auth.
Move the wfLoadExtension to after you define the settings
$wgSMFPath = '/var/www/html';
$wgFSPSoftware = 'smf2.0';
$wgFSPAdminGroups = array(1, 3);
wfLoadExtension('ForumSsoProvider');
Mediawiki will setup the extension as soon as you call the wfLoadExtension, so the settings need to be in place first.
from smf-mw-auth.
If the above suggestions don't do it, you might also need
$wgFSPPath = $wgSMFPath
before you load the extension.
This ended up being the fix I needed.
from smf-mw-auth.
Looks like the documentation is wrong. All paths should be using $wgFS prefix as its generic.
from smf-mw-auth.
Related Issues (16)
- $user->setupSession(); to wfSetupSession(); HOT 2
- Public View on MW 1.27.1 HOT 5
- $wgAuth is deprecated in 1.27 HOT 5
- Error with smcFunc in latest version HOT 1
- MW login not working HOT 3
- Errors in MW 1.31.1 HOT 2
- Login trouble with Mediwiki 1.36.1 HOT 5
- compat auth not working HOT 4
- Does not work with SMF 2.1.2 and MediaWiki 1.38.2 HOT 18
- Problem Authenticating to MW 1.40.0 from SMF 2.1.4 HOT 15
- People not being removed from Wiki groups HOT 3
- can't assign bureaucrat role anyhow HOT 3
- Cannot login? HOT 2
- 500 Internal Server Error with v1.24.0 HOT 5
- User not being logged in proper HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smf-mw-auth.