Hi @Smokinjo67@Ciencia Al Poder
I am working on mediawiki project facing the same issue of frequent logouts,
I have tried adding $wgMainCacheType in my localsettings but this does not works for me in frequent logouts.
I have also tried removing the below code inside of the docker in Setupt.php which is works fine but while login it's showing Cookies may be disabled.
if ( !defined( 'MW_NO_SESSION' ) && !$wgCommandLineMode ) {
// If session.auto_start is there, we can't touch session name
if ( $wgPHPSessionHandling !== 'disable' && !wfIniGetBool( 'session.auto_start' ) ){
session_name($wgSessionName ?: $wgCookiePrefix . '_session');
HeaderCallback::warnIfHeadersSent();
}
// Create the SessionManager singleton and set up our session handler,
// unless we're specifically asked not to.
if ( !defined( 'MW_NO_SESSION_HANDLER' ) ) {
MediaWiki\Session\PHPSessionHandler::install(
MediaWiki\Session\SessionManager::singleton()
);
}
$contLang = MediaWikiServices::getInstance()->getContentLanguage();
// Initialize the session
try {
$session = MediaWiki\Session\SessionManager::getGlobalSession();
} catch ( MediaWiki\Session\SessionOverflowException $ex ) {
// The exception is because the request had multiple possible
// sessions tied for top priority. Report this to the user.
$list = [];
foreach ( $ex->getSessionInfos() as $info ) {
$list[] = $info->getProvider()->describe( $contLang );
}
$list = $contLang->listToText( $list );
throw new HttpError( 400,
Message::newFromKey( 'sessionmanager-tie', $list )->inLanguage( $contLang )
);
}
unset( $contLang );
if ( $session->isPersistent() ) {
$wgInitialSessionId = $session->getSessionId();
}
$session->renew();
if ( MediaWiki\Session\PHPSessionHandler::isEnabled() &&
( $session->isPersistent() || $session->shouldRememberUser() ) &&
session_id() !== $session->getId()
) {
// Start the PHP-session for backwards compatibility
if ( session_id() !== '' ) {
wfDebugLog( 'session', 'PHP session {old_id} was already started, changing to {new_id}', 'all', [
'old_id' => session_id(),
'new_id' => $session->getId(),
] );
session_write_close();
}
session_id( $session->getId() );
session_start();
}
unset( $session );
} else {
// Even if we didn't set up a global Session, still install our session
// handler unless specifically requested not to.
if ( !defined( 'MW_NO_SESSION_HANDLER' ) ) {
MediaWiki\Session\PHPSessionHandler::install(
MediaWiki\Session\SessionManager::singleton()
);
}
}
Can anyone assist here.
Thanks.