Working with the wiki

From Federal Burro of Information
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

can't stay logged in

http://www.gossamer-threads.com/lists/wiki/mediawiki/95406

quick solution:

mkdir /tmp/apache-php-session
chown apache:apache /tmp/apache-php-session
/etc/init.d/apache2 stop
/etc/init.d/apache2 start

Restrict reading, editing, and creation

Restrict editing and creation to only logged in user:

in file: /var/www/html/wiki/LocalSettings.php

# dthornton Disable reading by anonymous users
$wgGroupPermissions['*']['read'] = false;

# dathornton , restrict editing to only logged in users.
$wgGroupPermissions['*']['edit'] = false;

# Anonymous users can't create pages
$wgGroupPermissions['*']['createpage'] = false;

# Prevent new user registrations except by sysops
$wgGroupPermissions['*']['createaccount'] = false;

Namespaces with subpage

$wgNamespacesWithSubpages = array_fill(0, 200, true);

(see http://www.mediawiki.org/wiki/Manual:$wgNamespacesWithSubpages for more on this )

Ldap Setup

installed LdapAuthentication-MW1.16-r61987.tar.gz in exentions dir:

(http://www.mediawiki.org/wiki/Extension:LDAP_Authentication)

in /var/www/html/wiki

extensions/
extensions/LdapAuthentication
extensions/LdapAuthentication/LdapAuthentication.i18n.php
extensions/LdapAuthentication/LdapAuthentication.php
extensions/LdapAuthentication/LdapAutoAuthentication.php

The first one worked : http://www.mediawiki.org/wiki/Extension:LDAP_Authentication/Configuration_Examples

At the begining of LocalSettings.php

# dthornton added for debugging, geeesh!
error_reporting(E_ALL);
ini_set("display_errors", 1);

at the end of LocalSettings.php

# require_once( "$IP/extensions/LdapAuthentication/LdapAutoAuthentication.php" );
require_once( "/var/www/html/wiki/extensions/LdapAuthentication/LdapAuthentication.php" );
$wgLDAPDebug = 999999;
$wgDebugLogGroups["ldap"] = "/tmp/wiki_ldap_debug.log" ;

$wgAuth = new LdapAuthenticationPlugin();

$wgLDAPDomainNames = array(
  'company'
);

$wgLDAPServerNames = array(
  'company' => 'sms-ldap-01'
);

$wgLDAPSearchStrings = array(
  'company' => 'uid=USER-NAME,ou=People,dc=sms,dc=company,dc=ca'
);

$wgLDAPEncryptionType = array(
  # 'company' => 'ssl'
  'company' => 'false'
);

$wgMinimalPasswordLength = 1;