Open main menu

Project:Support desk

About this board

Welcome to MediaWiki.org's Support desk, where you can ask MediaWiki questions!

There are also other places where to ask :

Before you post

Post a new question

  1. To help us answer your questions, please always indicate which versions you are using (reported by your wiki's Special:Version page):
    • MediaWiki
    • PHP
    • Database
  2. Please include the URL of your wiki unless you absolutely can't. It's often a lot easier for us to identify the source of the problem if we can look for ourselves.
  3. To start a new thread, click "Start a new topic".
Previous page history was archived for backup purposes at Project:Support_desk/old on 2015-07-30.
Other languages: English  العربية čeština Esperanto français 日本語 中文
Kking01 (talkcontribs)

I have tried every combination of plugins to get my Mediawiki to authenticate using LDAP to Active Directory with no such luck. I have attempted to convert from LDAPAuthentication, to LDAPHub migration. When attempting to login, I am now receiving this error, "There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Please resubmit the form." Any Help would be appreciated. All was working fine with LDAPAuthencation before the upgrade. Thanks again.

Bawolff (talkcontribs)

try setting $wgSessionCacheType = CACHE_DB;

Reply to "Mediawiki 1.33 running on Windows"

how to create a bot user on the hosted phabricator?

2
Abhipise (talkcontribs)

I am new to the phabricator and i want to connect phabricator to the Jenkins using the bot user.

But i am unable to create a bot user in the hosted phabricator.

AKlapper (WMF) (talkcontribs)

@Abhipise What exactly is "hosted Phabricator"? Is this question related to the Wikimedia instance of Phabricator at https://phabricator.wikimedia.org? If it is, then please elaborate. Thanks!

Reply to "how to create a bot user on the hosted phabricator?"

$wgWhitelistRead by group membership

1
91.42.115.186 (talkcontribs)

I have created a group that can only edit and view a single page. The page call is enabled by $wgWhitelistRead. This also allows anonymous users to read the page. Is it possible to create an if query for registered users in localsettings.php, so that only registered users see the website? Or is there a better way for my purpose?

Reply to "$wgWhitelistRead by group membership"
LeyteWolfer (talkcontribs)

Good evening, Wikipedians.

New wiki site. I'm trying to suppress the sidebar, as we have header columns instead (making the sidebar redundant). We're using the Refreshed skin as our default.

  • MW 1.33.1
  • PHP 7.2.24
  • MySQL 5.6.45

Any help/guidance will be appreciated.

Jonathan3 (talkcontribs)

You could play around with the CSS, e.g. set div#sidebar to display:none and change #content-wrapper from margin: 0 1em 0 12em to margin: 0 1em 0 1em.

Or you could just delete the sidebar div from the skin's php file.

LeyteWolfer (talkcontribs)

Thank you. I'll start looking into these two methods.

Reply to "Suppress the sidebar"

How can I install and enable LanguageConverter in Mediawiki1.33.0

6
TheEndOfKeyHighSchool (talkcontribs)
Malyacko (talkcontribs)

Hi, could you be more specific? What is the name of "the related .php file"?

TheEndOfKeyHighSchool (talkcontribs)

There is no /language folder in my Mediawiki software.Can I just add this folder to the Mediawiki's base path? If not, what should I do?

Bawolff (talkcontribs)

respectfully, you should stop looking at Mediawiki source files. All your posts are basically misinterpreting how mediawiki works. There is basically no reason you would have to modify any mediawiki includes files (other than adding things to the /extensions) If you didnt have the language directory nothing in mediawiki would work.


LanguageConverter is included with mediawiki by default. There are only a few languages it supports, and it will only be enabled if $wgLanguageCode is set to one of these languages (like zh or sr. If $wgUsePigLatinVariant also en)

What is your $wgLanguageCode set to, and what is the value of any other language config

TheEndOfKeyHighSchool (talkcontribs)

I have found the /language folder,but the LanguageConverter.php isnot available yet.How can I enable this class?

Malyacko (talkcontribs)

By being clearer. :) Nobody knows what "isnot available yet" means, nobody knows steps to reproduce, nobody knows which output you get where after which exact steps...

Reply to "How can I install and enable LanguageConverter in Mediawiki1.33.0"
Tviv54 (talkcontribs)

I have installed mediawiki 1.33.1 and working fine. I try to do login using LDAP authentication. So far i have installed Auth_remoteuser, LDAPAuthentication2, LDAPAuthorization, LDAPProvider, LDAPUserInfo and PluggableAuth.   Please help me to do the configuration and autoauth using LDAP.


Here are the my Virtual host configuration details

<VirtualHost *:9004>
    ServerName localhost
    ServerAlias localhost
    DocumentRoot "${INSTALL_DIR}/www/mediawiki-1-33-1" 
    <Directory "${INSTALL_DIR}/www/mediawiki-1-33-1">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
    AuthName "My Intranet"
    AuthType SSPI 
    SSPIAuth On 
    SSPIAuthoritative On
    SSPIDomain tcdc01.corp.tcc.inet
    SSPIOmitDomain On
    SSPIOfferBasic On
    #SSPIBasicPreferred On
    #SSPIofferSSPI On
    require valid-user
    require user "NT AUTHORITY\ANONYMOUS LOGON" denied 
   </Directory>
</VirtualHost>


Here are the my Localsettings details

       $wgCookieSecure = false; 
       wfLoadExtensions([  'PluggableAuth',
         'Auth_remoteuser',
         'LDAPProvider',
         'LDAPAuthentication2',
         'LDAPAuthorization',
         'LDAPUserInfo'
 ]);
  $LDAPAuthorizationAutoAuthRemoteUserStringParser = 'username-at-domain';
  $LDAPAuthentication2UsernameNormalizer = 'strtolower';
  $LDAPAuthentication2AllowLocalLogin = false;
  $wgAuthRemoteuserAllowUserSwitch = true;
  $wgPluggableAuth_EnableLocalLogin = false;
 $wgAuthRemoteuserUserName = function() {
 $user = '';
 if( isset( $_SERVER[ 'REMOTE_USER' ] ) ) {
    echo $user = strtolower( $_SERVER[ 'REMOTE_USER' ] ); // Returns my remote user name
 }
 return $user;
};
$LDAPProviderDomainConfigProvider = function() {
$config = [
 'company.local' => [
   'connection' => [
      "server" => "corp.tcc.inet",
      "options" => [
            "LDAP_OPT_DEREF" => 1
      ],
      "basedn" => "o=Company",
      "groupbasedn" => "o=Company",
      "userbasedn" => "o=Company",
      "searchattribute" => "uid",
      "usernameattribute" => "uid",
      "realnameattribute" => "fullname",
      "emailattribute" => "mail",
      "grouprequest" => "MediaWiki\\Extension\\LDAPProvider\\UserGroupsRequest\\GroupMember::factory"
  ],
  'authorization' => [
     'rules' => [
        'groups' => [
           'required' => [
              'cn=WikiAccess,ou=Groups,o=Company'
            ]
         ]
      ]
  ],
 'userinfo' => [
        'attributes-map' => [
           'email' => 'mail',
           'realname' => 'fullname'
        ]
  ]
 ]
];
return new \MediaWiki\Extension\LDAPProvider\DomainConfigProvider\InlinePHPArray( $config );
};
Reply to "Auto authentication using LDAP"
Tunglinwu (talkcontribs)

as title

My mediawiki version is 1.33.1

MarkAHershberger (talkcontribs)

Which page does not update? Do you have the job queue running?

Tunglinwu (talkcontribs)

Special:WantedPages

It's not update when page create or not need.

I have no job queue

I meet this error after edit templete, I change link in it.


AhmadF.Cheema (talkcontribs)
Tunglinwu (talkcontribs)

I ruu it, it says Job queue is empty.

And show notice:

PHP Notice:  Undefined index: SERVER_NAME in ./includes/GlobalFunctions.php on line 1376

PHP Notice:  Undefined index: SERVER_NAME in ./includes/GlobalFunctions.php on line 1376


MarkAHershberger (talkcontribs)

It still isn't clear to me what you mean when you say that the page does not update.

What, exactly, does the page display? What do you think it should display?

Tunglinwu (talkcontribs)

I think it not exist on Special:WantedPages .

e.g. I edit page and remove link to page A. (A had not be create and only this page need.)

But Special:WantedPages still show it for a long time.


Ciencia Al Poder (talkcontribs)

Does Special:WhatLinksHere/A (where A is the page that doesn't exist) display any page?

Reply to "Wanted pages not update"

user cannot log in since Mediawiki upgrade

11
Usda-mark (talkcontribs)

Last week our Mediawiki was upgraded from 1.18 to 1.33. One user is receiving "Fatal error authenticating user". Our wiki is configured with local logon disabled and authentication with LDAP. I had Skype session with this user and he was able to login using my browser, but cannot on his desktop trying Firefox, Chrome, etc.. The pluggableeauth.log returns "Authentication failure, ERROR: Please choose a valid domain, ERROR: return to URL is null or empty" and found this in debug.log "[DBQuery] SELECT  lc_value  FROM `l10n_cache`    WHERE lc_lang = 'en' AND lc_key = 'messages:pluggableauth-fatal-error'  LIMIT 1". Thanks in advance for any help!

MarkAHershberger (talkcontribs)

Could you paste your ldap provider json file (without passwords, of course)?

Also, what are the debug log lines leading up to the DBQuery line you posted?

Usda-mark (talkcontribs)

// LDAPProvider

$LDAPProviderDomainConfigProvider = function() {

        $config = [

                'EDC' => [

                        'connection' => [

                                "server" => "edc.ds1.usda.gov",

                                "user" => "cn=s_wikiuser,ou=service,ou=accounts,ou=nitc,dc=edc,dc=ds1,dc=usda,dc=gov",

                                "pass" => '########',

                                "options" => [

                                        "LDAP_OPT_DEREF" => 1

                                ],

                                "basedn" => "OU=Privileged,OU=Accounts,OU=NITC,DC=EDC,DC=DS1,DC=USDA,DC=GOV",

                                "userbasedn" => "OU=Privileged,OU=Accounts,OU=NITC,DC=EDC,DC=DS1,DC=USDA,DC=GOV",

                                "searchattribute" => "samaccountname",

                                "usernameattribute" => "samaccountname",

                                "realnameattribute" => "cn",

                                "emailattribute" => "mail"

                        ]

                ]

        ];

        return new \MediaWiki\Extension\LDAPProvider\DomainConfigProvider\InlinePHPArray( $config );

};


[DBQuery] DELETE FROM `objectcache` WHERE keyname = 'wiki_db:messages:en:lock'

[MessageCache] MessageCache::load: Loading en... local cache is empty, global cache is expired/volatile, loading from database

[DBQuery] SELECT  lc_value  FROM `l10n_cache`    WHERE lc_lang = 'en' AND lc_key = 'messages:ldapauthentication2-no-domain-chosen'  LIMIT 1

[session] SessionBackend "5ghgav4ehrd13lmk794bkmulf1njv6g8" save: dataDirty=1 metaDirty=0 forcePersist=0

[session] SessionBackend "5ghgav4ehrd13lmk794bkmulf1njv6g8" data dirty due to dirty(): PluggableAuthLogin->execute/MediaWiki\Auth\AuthManager->setAuthenticationSessionData/MediaWiki\Session\Session->setSecret/MediaWiki\Session\Session->set/MediaWiki\Session\SessionBackend->dirty

[session] SessionBackend "5ghgav4ehrd13lmk794bkmulf1njv6g8" save: dataDirty=1 metaDirty=0 forcePersist=0

[DBQuery] SELECT  lc_value  FROM `l10n_cache`    WHERE lc_lang = 'en' AND lc_key = 'messages:pluggableauth-fatal-error'  LIMIT 1

MarkAHershberger (talkcontribs)

What do you use for your session store (e.g. $wgSessionCacheType)? How about $wgMainCacheType?


That still isn't enough of the debug log. Could you paste the entire request that includes this bit?

Usda-mark (talkcontribs)

Sorry, I'm fairly new to Mediawiki. Looks like $wgSessionCacheType = CACHE_DB; and $wgMainCacheType    = CACHE_NONE;

Is the below enough? There is more if you need it.

MarkAHershberger (talkcontribs)

Thanks, that looks like the entire request, but it is apparently the GET request for when you first visit the login page. Could you get the log from your user's (it is only one, right?) POST request when the login fails?

Also, you should really be using Memcached for session handling. Then you would set both those variables to CACHE_MEMCACHE:

$wgMainCacheType = CACHE_MEMCACHED;
$wgMemCachedServers = [ "127.0.0.1:11211" ];
$wgSessionCacheType = CACHE_MEMCACHED;

Putting session handling into Memcached can resolve some session issues all by itself.

If you are using a Linux distribution like Redhat or Debian, it should be simple to install.

Usda-mark (talkcontribs)

Okay, I will try your suggestion for session handling. It is only one user that I know of. Here is the post: