Project:Support desk/Sections/Extension

__NEWSECTIONLINK__ = Extension Support =

Installing extensions – Warning: Cannot modify header information - headers already sent by... [German]

 * MediaWiki version: 1.13.2
 * PHP version: 5.2.2 (apache2handler)
 * MySQL version: 5.2.2 (apache2handler)
 * URL: Intranet

Hallo, ich bin leider nur dem Deutschen oder Französischen mächtig. Vielleicht kann mir trotzdem jemand helfen! Also: ich brauche ein Extension, mit dem ich Artikel oder Kategorien schützen kann. Ich hab auch genügend Extensions hier gefunden. Aber egal welche Extension ich installier, bekomme ich IMMER diese Fehlermeldung: Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\MinjusWiki\LocalSettings.php:1) in C:\xampp\htdocs\MinjusWiki\includes\WebResponse.php on line 10

Kann das vielleicht daran liegen, dass ich eine anderssprachige Media-Wiki-Version (luxemburgisch) habe? vielen dank im vorraus, --JimHawk 13:06, 11 November 2008 (UTC)

And 09:18, 16 January 2009 (UTC) Ich spreche kein Deutsch, mais j'espere que vous pouvez comprendre ca: on ne peut pas faire ou ecrire un cookie apres avoir commencer a ecrire HTML. You can't redirect or write a cookie after you've started writing the HTML.

automatically generate a list of keywords

 * MediaWiki version:
 * PHP version:
 * MySQL version:
 * URL:

I have no Wiki yet - but I would like to.

Based on the latest Wiki version I have one question:

Is it possible to generate a list of keywords? I would like to have a special page with (more or less) detailed information where I find content to my keyword (like an index) inside my wiki. When you search for a article you get detailed information for the typed word. But I would like to have a printable overview about the keywords - so that I can print out the complete wiki and have a directory/indices-list

I would like to mark words inside the article (like: cost center ) and the Special page generates automatically an alphabetical list like (KEYWORD: ARTICLE Header - Place inside article)

e.G.:
 * Cost Center
 * Organisation - 10.3 Organisation Forms
 * Business - 7.5.11 Center Forms

—80.133.173.238 09:42, 13 November 2008 (UTC)

Installing TreeAndMenu

 * MediaWiki version: 1.11.0
 * PHP version: 5.2.5 (apache)
 * MySQL version: 4.1.22-standard
 * URL: www.elektro-ikt.no

Is it possible to get help with installing TreeAndMenu. I want it to show in the navigation bar at left. I can give access to the url if someone want to help me.

TST—77.110.193.21 10:03, 14 November 2008 (UTC)

FCKEditor integration fails with current SVN MediaWiki 1.14 rev. 43724

 * MediaWiki: 1.14alpha
 * PHP: 	5.2.0-8+etch13 (apache2handler)
 * MySQL: 	5.0.32-Debian_7etch8-log
 * URL: http://160.45.63.55/test/Main_Page ; this page is ok, but an error occurs when clicking on edit (we have no anonymous access, however).

The integration of FCK was attempted with an up-to-date MediaWiki and following the instructions. A record of the attempts is openly available. About the documentation: Note that there is some confusion with the extension already checked out in MediaWiki extensions, which is marked BROKEN and was not used. Or should it be?) The error message is:

Catchable fatal error: Argument 1 passed to Skin::setupUserCss must be an instance of OutputPage, none given, called in /usr/share/mediawiki/FCKeditor/FCKeditor.body.php on line 341 and defined in /usr/share/mediawiki/phase3/includes/Skin.php on line 560

See also http://www.mediawiki.org/wiki/Extension_talk:FCKeditor_(by_FCKeditor_and_Wikia)#Not_Working_1.14_r40286 for same error experienced by another user several months ago. Any help or experience with this?

—G.Hagedorn 15:44, 19 November 2008 (UTC)


 * FCKeditor is broken, see ticket #2626 on their bugtracker (it seems that you've found it already). -- Sayuri 13:34, 16 January 2009 (UTC)

Error with Lifemarks, cannot access protected property …

 * MediaWiki version: 1.13.2
 * PHP version: 5.2.6 (cgi)
 * MySQL version: 4.0.27-standard
 * URL: http://wiki.voelkersbach.de

Hi there,

I'm german - so please sorry for my bad english :-)

I've installed the LifeMarks-Extension and when I click on Lifemarks in my SpecialPages i get this error:

Fatal error: Cannot access protected property OutputPage::$mParserOptions in /homepages/40/d203059780/htdocs/voelkersbach.de/wiki/extensions/LifeMarks.php on line 493

I've done everything from the howto - I have no idea whats going wrong...

What can i do?

Regards Thomas —Thomasnoth 22:08, 23 November 2008 (UTC)

Infobox?

 * MediaWiki version: 1.13.1
 * PHP version: 5.2.0-8+etch11 (apache2handler)
 * MySQL version: 5.0.32-Debian_7etch5-log
 * URL:

Hallo, i have make me an own Wiki. Now I want to make an Post whith an Infobox, but it wount make. Can you tell me, how I Install/Build this feature/Extension?

Thanks

PS: you can write me an e-mail. creutznacher@gmail.com

—79.207.88.201 19:20, 26 November 2008 (UTC)

Can't get Extension : Google Adsense 2 working

 * MediaWiki version: 1.13.2
 * PHP version: 5.2.5 (apache)
 * MySQL version: 5.0.67-community
 * URL: http://www.fordmondeo.org/wiki/index.php/Main_Page

I've followed the instructions on the Extension:Google Adsense 2 page (Extension:Google_AdSense_2) but nothing appears to be happening. Please help as I'm not too conversant with Mediawiki or wiki software in general.

Many Thanks

Nick —82.44.254.89 19:10, 2 December 2008 (UTC)

Local authentication on Linux, NIS

 * MediaWiki version
 * MediaWiki 	1.13.2
 * PHP 	5.1.6 (apache2handler)
 * MySQL 	5.0.45

I am trying to find an extension that will allow me to use local authentication on the linux server to authenticate users.

I use NIS on the Linux cluster and I'd like to have the option of using my NIS users edit the wiki.

I'd like to have the NIS groups be setup to control the access and editing of the wiki.

I think I can use Active Directory, but that is not what I need to do in this case.

On google there is a UnixLocalAuth.php extension, but I cannot find anywhere to download it.

Thanks THP3 —136.141.6.76 00:09, 4 December 2008 (UTC)

Using the Boilerplate extension - Help needed.

 * MediaWiki version: 1.13.1
 * PHP version: 5.2.5 (cgi)
 * MySQL version: 5.0.45-community-log
 * URL: http://www.jefferson-wiki.com/wiki/

I am trying to start a new wiki and need to give our users a predefined form to help them begin to add content to our wiki. Other wiki's use scaffolds to help build a new wiki. It helps to give new users some structure to help them build a new wiki. The closest thing I could find on MediaWiki is the Boilerplate. It is supposed to let the admin give the users some predefined text for the wiki to help them get started. I am very new to this and am running into problems. I need some help!

I am seeking information on the use of the Boilerplate extension. I have followed the instructions and have copied the code from Boilerplate.php to the extensions directory. However, where should the Boilerplate file be located and what are the contents of the file?

In the instructions it says:

Step 3: Create a page named Boilerplate on your MediaWiki site. Whatever is included in this Boilerplate page will serve as the default template for any new pages created on your site.

But they do not give any details on where the file should go. How to I point to the file? What is the text of the Boilerplate file look like? If someone can show me the syntax of the file contents and how to use them to create a form for the user to fill in when creating a new article that is exactly what I need. An example Biolerplate file would be even better. Does anyone have an example of a site that uses the Boilerplate that would be good too.

Thanks, Steve

Please send any help you can provide to me at duffsb @ comcast.net

—68.37.61.154 19:39, 15 December 2008 (UTC)

Problem with GenericEditPage extensions

 * MediaWiki version: 1.13.2
 * PHP version: 5.2.6 (cgi)
 * MySQL version: 5.0.68-log
 * URL: http://www.streetkiss.com/mediawiki/

Hi, When I try to edit a page with the extension GenericEditPage it add " " at the end of the article You can see the problem here : http://www.streetkiss.com/mediawiki/index.php?title=Test_Uniwiki if someone could help by leaving a message on the wiki page bellow or to my email : etienne.martin@streetkiss.com it would be very nice !

—Monsieur Martin 20:18, 15 December 2008 (UTC)

DPL-Error: Illegal mix of collations ... for operation 'concat' (localhost)

 * MediaWiki version: 1.13.2
 * PHP version: 5.2.2
 * MySQL version: 5.0.41
 * URL: localhost

Hallo,

I try to use the DPL extension. So I installed it and as an exampled I typed the following code:

 category = Management 

The result was this error message:

The DPL extension (version 1.7.4) produced a SQL-statement which lead to a Database error... After the SQL-statement the Error message is shown:

The error message is: Illegal mix of collations (utf8_general_ci ...) for operation 'concat' (localhost).

Do I have to change any settings in my database? Or do you have any idea?

Thank you for your endeavors.

Uwe Henning —194.114.62.70 08:24, 16 December 2008 (UTC)

TinyMCE extension error

 * MediaWiki version: 1.13.3
 * PHP version: 5.2.0
 * MySQL version: 2.9.11
 * URL: Intranet

I installed TinyMCE extension and returned a error:

Fatal error: Call to undefined method Parser::stripToc in C:\Arquivos de programas\EasyPHP 2.0b1\www\wiki\extensions\TinyMCE_MW.php on line 257

how fix this?

—Graffo 12:31, 18 December 2008 (UTC)

Tex does not work

 * MediaWiki 1.13.3:
 * PHP version: 5.2.6
 * MySQL version: 5.0.32-Debian_7etch8
 * URL: http:www.eewiki.de

Latex does not working on my Webaccount by Sysprovide.de. I have only FTP-Upload. NO SSH! This is a part of my Configuration at the LocalSettings.php:

To enable image uploads, make sure the 'images' directory is writable, then set this to true: $wgEnableUploads      	= true; $wgUseImageResize		= true; $wgUseImageMagick 		= true; $wgImageMagickConvertCommand = "/usr/bin/convert";

$wgUseTeX          = true; $wgTexvc			= "/var/www/empty/web254/"; $wgMathPath			= "{$wgUploadPath}/math"; $wgMathDirectory	= "{$wgUploadDirectory}/math"; $wgTmpDirectory		= "{$wgUploadDirectory}/tmp"; But it doesn't work. Do you have any idea? I have got only a bug report:

Parser-Fehler (Das temporäre Verzeichnis für mathematische Formeln kann nicht angelegt oder beschrieben werden.): a+b=c He doesn't find the temp folder. Where is usually the temp and math folder in the wiki?

Regards

Sven Tesker —Tesker 18:17, 18 December 2008 (UTC)

Configuring MediaWiki SMTP to send email to users

 * MediaWiki: 1.11.0
 * PHP: 5.2.5 (apache2handler)
 * MySQL: 5.0.50-enterprise-gpl-nt-log

I am trying to configure the SMTP to send users email. I put the SMTP array of parameters in the localsettings.php file. But I get an error when I try to click the 'email password' dialog from the login page. In the error below, it mentions the incluses\UserMailer.php line 108.... that is the line (	require_once( 'Mail.php' );). Where is the Mail.php file located? I don't see it under the includes folder. Is there a wiki page the describes the complete instructions for configuring MediaWiki mail?

Warning: require_once(Mail.php) [function.require-once]: failed to open stream: No such file or directory in D:\apache\apache2.2\htdocs\mediawiki\includes\UserMailer.php on line 108 Fatal error: require_once [function.require]: Failed opening required 'Mail.php' (include_path='D:\apache\apache2.2\htdocs\mediawiki;D:\apache\apache2.2\htdocs\mediawiki/includes;D:\apache\apache2.2\htdocs\mediawiki/languages;.;C:\php5\pear') in D:\apache\apache2.2\htdocs\mediawiki\includes\UserMailer.php on line 108

Melissa —Doughertyma 19:46, 23 December 2008 (UTC)


 * As Manual:$wgSMTP tells you, you have to install PEAR's Mail package for it to work. -- Sayuri 13:34, 16 January 2009 (UTC)

Extension:Farmer and transwiki problems

 * MediaWiki version: SVN build
 * PHP version: 5.26
 * MySQL version:
 * URL: Localhost

I installed Farmer, and it shows the special page - as it should do, but it won't let me create the wikis.

This is from my LocalSettings.php file: $wgSharedTables = array( 'user' => $sharedPrefix . 'user', 'user_groups' => $sharedPrefix . 'user_groups', 'interwiki' => $sharedPrefix . 'interwiki', 'math' => $sharedPrefix . 'math', );

require_once( 'extensions/ExtensionFunctions.php' ); require_once( 'farmer/Farmer.php' );

/* We use the internal _matchByURLHostname function to find the wiki name */ $wgFarmerSettings['wikiIdentifierFunction'] = array('MediaWikiFarmer', '_matchByURLHostname'); $wgFarmerSettings['dbAdminUser'] = 'root'; $wgFarmerSettings['dbAdminPassword'] = 'west'; $wgFarmerSettings['dbTablePrefixSeparator'] = '_-_'; $wgFarmerSettings['newDbSourceFile'] = realpath(dirname(__FILE__)). '/extensions/farmer/daughterwiki.sql';

$wgFarmerSettings = array( 'configDirectory' => realpath(dirname(__FILE__)) . '/configs/', 'defaultWiki' => 'autowiki1', 'wikiIdentifierFunction' => array('MediaWikiFarmer', '_matchByURLHostname'), 'matchRegExp' => '', 'matchOffset' => null, 'matchServerNameSuffix' => 'localhost',

'onUnknownWiki' => array('MediaWikiFarmer', '_redirectTo'), 'redirectToURL' => 'http://127.0.0.1/',

'dbAdminUser' => 'root', 'dbAdminPassword' => 'west',

'newDbSourceFile' => realpath(dirname(__FILE__)). '/daughterwiki.sql',

'dbTablePrefixSeparator' => '', 'dbTablePrefix' => '',

'defaultMessagesFunction' => array('MediaWikiFarmer', '_getDefaultMessages'),

'perWikiStorageRoot' => 'C:\xampp\htdocs\autowiki1', 'defaultSkin' => 'monobook', );

$wgExtensionFunctions[] = 'MediaWikiFarmer_Initialize';

/** $wgGroupPermissions['*']['farmeradmin'] = false; $wgGroupPermissions['sysop']['farmeradmin'] = true; $wgGroupPermissions['*']['createwiki'] = false; $wgGroupPermissions['sysop']['createwiki'] = true; $wgAvailableRights[] = 'farmeradmin'; $wgAvailableRights[] = 'createwiki'; require_once('farmer/Farmer.php');
 * These should really go in the initialize function, but MediaWiki initializes
 * $wgUser before the extensions are initialized. Seems like weird behavior,
 * but OK.

$wgFarmer = new MediaWikiFarmer($wgFarmerSettings); $wgFarmer->run; Whenever I try to run Special:Farmer this error occurs: Fatal error: Call to undefined function wfmsghtml in C:\xampp\htdocs\autowiki1\Farmer\MediaWikiFarmer.php on line 112

Also, when I try to transwiki some Wikimedia files with large page histories, this notice happens:

Fatal error: Maximum execution time of 120 seconds exceeded in C:\xampp\htdocs\autowiki1\includes\StringUtils.php on line 126

Anyone know how to fix this??

Thanks. --82.42.237.84 15:39, 30 December 2008 (UTC)


 * Simplest fix? Don't use Farmer, it's very outdated extension. The actual bug might be caused by the fact that the wfMsgHtml call is inside a throw new MWException call - I don't know if you're supposed to translate exceptions and I don't think that MediaWiki core software does so. For the second error, increase your PHP's time limit by setting something like this in your wiki's LocalSettings.php: set_time_limit(900); -- Sayuri 13:34, 16 January 2009 (UTC)

Userpages extension

 * MediaWiki version: 1.13.3
 * PHP version: 5.2.6 (cgi-fcgi)
 * MySQL version: 4.1.22-standard

I wanna create a extension in order to display extra info (determined by a interface message) in the user page. What hooks I need to use (or to add)? Userpages are special pages? Thanks.Eloy 23:06, 31 December 2008 (UTC)

RSS feeds

 * MediaWiki version: 1.13.2
 * PHP version: 5.x
 * MySQL version: 5
 * URL:

Hi,

I have a requirement withing organisation to have RSS feed enabled for some pages i create. For example say one user is creating a page called 'Sales plan'. Now users who are interested in knowing updates happening to that page only should be able to add a RSS feed for updates of this "Sales Plan" page alone. The recent changes function for RSS/Atom feed gives feed xml every time a change is made to "any" page. What ever i have mentioned is it possible to do any extention or feature list of Mediwiki. Any help in this regard will be highly appreciated.

—122.166.42.202 11:59, 1 January 2009 (UTC)

Problem with Wgraph extension output not rendered by MediaWiki

 * MediaWiki version: 1.13.3
 * PHP version:  	5.2.6 (apache2handler)
 * MySQL version: 5.0.67
 * URL: n/a but the exact same problem can be seen on bottom of http://s23.org/wiki/Sandbox

Installed Wgraph extension. The images get produced ( confirmed ), however on the wiki page I can see only 

(made with Wgraph)

Tried to put $wgRawHtml = true in LocalSettings.php but this didn't change anything.

Solution: There is a problem with the way Wgraph inserts it's HTML output. To correct it, in your Wgraph.php file, find the lines global $wgRawHtml; $wgRawHtml = true; and comment them out for security reasons. Then find the line: return $result; //. $wgraph. ":". $thumbResolution ."/".$resolution. ', '.$clipThumb. '---'. $clipImg; and replace it with

return array( $result, noparse => true, isHTML => true ); More information on why this works can be found on http://jimbojw.com/wiki/index.php?title=Raw_HTML_Output_from_a_MediaWiki_Parser_Function

—78.90.3.108 23:11, 12 January 2009 (UTC)

Problem with sysop/bureaucrat permissions after creating account with UserLoadFromSession hook
Apologies for the length of this post, but I'm utterly stymied after working on this for ages.
 * MediaWiki version: 1.13.0
 * PHP version: 5.2.6 (apache2handler)
 * MySQL version: 5.0.67
 * URL: http://ntm-igdev02.nott.ime.reuters.com/wiki/index.php/Main_Page (internal)

I am setting up 1.13.0 as a new system and will soon (I hope!) be migrating the content from an older version to it. This migration includes using our company SSO and I've successfully used the UserLoadFromSession hook to implement this. However, there is one glitch: I currently have two IDs, one original one (SS) for use without the hook and another (Sam.Sexton) that was created and is authenticated by the hook. Both of these are assigned as Sysop and Bureaucrat, but these permissions are only effective for the original user (SS) - as the other one (Sam.Sexton), I don't see the restricted special pages.

(first | last) View (previous 50) (next 50) (20 | 50 | 100 | 250 | 500)


 * SS ?(bureaucrat, sysop)
 * Sam.Sexton ?(bureaucrat, sysop)
 * WikiSysop ?(bureaucrat, sysop)

(first | last) View (previous 50) (next 50) (20 | 50 | 100 | 250 | 500)

I have made the following observations and investigations.


 * 1) The database records I create with the hook differ from the original (SS) record in that:
 * 2) user_touched is initially nulls (\0\0\0 rather than NULL) despite my setting it - but this is corrected by later activity.
 * 3) user_email_token and user_email_token_expires for Sam.Sexton are NULL, but I've copied values from SS and that made no difference.

I've looked at Skin.php and added this hack to see what was going on:

/* Hack to see what's going on. Sam 090108 */ wfDebugBacktrace; $rpages = SpecialPage::getRestrictedPages; wfDebug("Restricted pages for $wgUser->mName\n"); foreach ( $rpages as $rpage) { wfDebug(" $rpage\n"); }		/* end hack */


 * but nothing was added to the debug file, which is receiving other debug info.


 * I have even resorted to running truss on navigating to Special Pages as both users. There was a rather curious difference between the two - the one for Sam.Sexton (created with the hook) contained several calls to resolvepath that weren't in the truss for SS. This relates to symbolic link resolution - not unreasonably, as htdocs/wiki is a link to the files in my home dir for easy maintenance - and I've not seen any problems related to that arrangement. However, as I didn't get those calls for SS, I copied the files so that the link was removed and all files native - but that made no difference.


 * My suspicions are that there's something I'm missing in the new account creation process, but for the life of me I can't see what! I suspect that there must be another criterion other than sysop/bureaucrat group membership required to see the restricted pages, but it's escaped my investigations so far. I'd be grateful for any illumination or suggestions on what else to check. Below is the code for the hook and a sample of the log for the db entry creation. Thanks in advance! Any constructive comments on the code will be welcomed - this is not an area in which I am overburdened with experience! ;-)

<?php function fnUserAuthTGST($user, &$result) {

/*	This function performs the user authentication for TGSTWiki and D3000Wiki. It requires the following fields to be added to the default {prefix}_user table in the database: user_employee_id	tinytext user_market_group	tinytext

Ref:	http://www.mediawiki.org/wiki/Manual:Hooks/UserLoadFromSession http://svn.wikimedia.org/doc/classUser.html */ $fname  = "UserAuthTGST::fnUserAuthTGST"; $SAFE   = "https://safeqa.thomson.com/login/sso/SSOService?app=tgstwiki&returnURL="; $errpage = "http://ntm-igdev02.nott.ime.reuters.com/wikiaccess.php"; $allowed = 300; # Five minutes diff is allowed. logTGST("Page: " . $_SERVER['REQUEST_URI']); if (isset($_COOKIE['TGSTWiki'])) { $tgstcookie = $_COOKIE['TGSTWiki']; logTGST("TGSTWiki cookie found");

if (isset($_REQUEST['digest'])) { logTGST("digest exists as well - ignoring it."); }

loadFromDatabaseTGST($user, $tgstcookie); $result = 1; // This causes the rest of the authentication process to be skipped. return(false);  // As should this, according to the internal error report: // Detected bug in an extension! Hook fnUserAuthTGST failed to return a value; should return true to continue hook processing or false to abort.

} elseif (isset($_REQUEST['digest'])) { # Just back from SAFE - validate the result. $digest     = $_REQUEST['digest']; $empid      = $_REQUEST['uid']; $email      = $_REQUEST['email']; $firstname  = $_REQUEST['firstname']; $lastname   = $_REQUEST['lastname']; $marketgroup = $_REQUEST['marketgroup']; $intime     = $_REQUEST['time']; $returnurl  = $_REQUEST['returnURL']; $thispage   = curPageURL; $mytime     = date("Y:m:d:H:i:s", time);

// Get the secret ... $file = fopen("/usr/local/apache2/htdocs/wiki/TGST/conf/.SAFEkey", "r") or exit("Unable to open file!"); $secret = chop(fgets($file),"\n"); # Drop trailing LF		fclose($file);

$md5string = "$empid$intime$secret"; $mydigest = md5($md5string); if ( "$digest" != "$mydigest" ) { // Problem! Log secure info to file: logTGST("Digests don't match for $email - unable to proceed."); logTGST(" digest=$digest"); logTGST(" mydigest=$mydigest"); logTGST(" md5string=$md5string"); // ... and tell the user something interesting: $errpage .= "?error=Digest%20mismatch"; $errpage .= "&digest=$digest&empid=$empid&email=$email&first=$firstname&last=$lastname&mg=$marketgroup&intime=$intime"; $errpage .= "&mytime=$mytime&returnurl=$returnurl"; // redirect to report error ... http_redirect($errpage, array, true, HTTP_REDIRECT); }

$diff = valtime($intime); if ( $diff > $allowed ) { logTGST("Time difference ($diff) is too great for $email"); logTGST(" intime=$intime"); logTGST(" mytime=$mytime"); // ... and tell the user something interesting: $errpage .= "?error=Time%20difference%20too%20great."; $errpage .= "&digest=$digest&empid=$empid&email=$email&first=$firstname&last=$lastname&mg=$marketgroup&intime=$intime"; $errpage .= "&mytime=$mytime&returnurl=$returnurl"; $errpage .= "&timediff=&diff"; // redirect to report error ... http_redirect($errpage, array, true, HTTP_REDIRECT); // $result not set so that authentication continues - and should fail. return(true); // This should have the same effect. }		logTGST("SAFE validation successful for $email"); # Validation successful - create cookie with all SAFE fields. $tgstcookie = "$empid|$email|$firstname|$lastname|$marketgroup"; $tgstcookie = str_replace(' ', '%20', $tgstcookie); # We'll start with a week and perhaps extend to a year....? if ( setrawcookie("TGSTWiki", $tgstcookie, time+7*24*60*60, '/', $_SERVER['SERVER_NAME']) ) { logTGST(" cookie set successfully."); } else { logTGST(" cookie setting failed."); }		// Now see if the user is already in the database ... $user = loadFromDatabaseTGST($user, $tgstcookie); $result = 1; // This causes the rest of the authentication process to be skipped. return(false); // Ditto (see above) } else {	// No cookie, so we go to SAFE. logTGST("TGSTWiki cookie not found - redirecting to SAFE.");

$SAFE .= curPageURL; // Append this page's name http_redirect($SAFE, array, true, HTTP_REDIRECT); }	// No cookie }

function loadFromDatabaseTGST($user, $tgstcookie) { $fname  = "UserAuthTGST::loadFromDatabaseTGST"; // Check whether user is in the database - if so, complete User. logTGST("Entering $fname ..."); // Explode the cookie: list ($empid, $email, $first, $last, $marketgroup) = explode("|", $tgstcookie, 5); logTGST("Cookie exploded: $empid, $email, $first, $last, $marketgroup"); // Now see if the user is known ... $dbr =& wfGetDB( DB_SLAVE ); $s = $dbr->selectRow( 'user', array('user_id'), array('user_employee_id' => $empid), $fname); if ($s === false) { logTGST("No entry found in db for employee id $empid - creating one ..."); $user = new User; // MediaWiki requires names to start with a capital, so we have a stab at a reasonably formed name: $temp = explode(".", substr($email,0,strpos($email,'@'))); $i  = 0; $lim = sizeof($temp); while ( $i < $lim) { $temp[$i] = ucwords($temp[$i]); $i++; }		$userName = implode(".", $temp); $user->loadDefaults($userName);        // Added as it's done this way in CentralAuth. $user->mEmail             = $email; $user->mName              = $userName; // Redundant given use of loadDefaults...? $user->mEmployeeId        = $empid; $user->mRealName          = "$first $last"; $user->mMarketGroup       = $marketgroup; $user->mEmailAuthenticated = wfTimestamp; $user->mTouched           = wfTimestamp; logTGST(" mName               = $user->mName"); logTGST(" mEmployeeId         = $user->mEmployeeId"); logTGST(" mRealName           = $user->mRealName"); logTGST(" mMarketGroup        = $user->mMarketGroup"); logTGST(" mEmailAuthenticated = $user->mEmailAuthenticated"); logTGST(" mTouched            = $user->mTouched"); $user->addToDatabase; // No longer returns mId - it never did, but Roddy thought so! logTGST("User added to database with ID $user->mId."); } else { $user->mId = $s->user_id; logTGST("DB entry found for employee id $empid with user id $user->mId"); } 	// Load the existing or newly-created user from the database ... if ( !$user->loadFromDatabase ) { logTGST("loadFromDatabase failed for user ID $user-mId"); }	return $user; }

function curPageURL { $pageURL = 'http'; if (isset($_SERVER['HTTPS'])) {$pageURL .= "s";} $pageURL .= "://"; if ($_SERVER['SERVER_PORT'] != "80") { $pageURL .= $_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].$_SERVER['REQUEST_URI']; } else { $pageURL .= $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; } return $pageURL; }

function curPageName { return substr($_SERVER['SCRIPT_NAME'],strrpos($_SERVER['SCRIPT_NAME'],'/')+1); }

function valtime($intime) {

// Check whether supplied time is within five minutes of now.

$time1  = implode(explode(":", $intime)); // Colonic irrigation!

// Play at being a Time Lord here for testing.

$inepoch = strtotime($time1); // Convert to epoch $myepoch = time;

$diff = $myepoch - $inepoch; return($diff); }

function logTGST($message) {

// Log significant events during authentication if the log file exists.

$day = gmdate("Ymd"); $authlog = "/reuters/radt/local/log/TGSTWiki.authlog.$day"; $now = gmdate("Y-m-d H:i:s "); if (file_exists($authlog)) { if ($file = fopen($authlog, "a")) { fputs($file, $now . $message . "\n"); fclose($file); return(true); } else { return(false); }	} else { return(true); } } ?> 2009-01-13 15:08:39 Page: /wiki/index.php?title=Special:RecentChanges&feed=rss 2009-01-13 15:08:39 TGSTWiki cookie found 2009-01-13 15:08:39 Entering UserAuthTGST::loadFromDatabaseTGST ... 2009-01-13 15:08:39 Cookie exploded: 8009449, sam.sexton {at} thomsonreuters.com, Sam, Sexton, 11929 2009-01-13 15:08:39 No entry found in db for employee id 8009449 - creating one ... 2009-01-13 15:08:39  mName               = Sam.Sexton 2009-01-13 15:08:39  mEmployeeId         = 8009449 2009-01-13 15:08:39  mRealName           = Sam Sexton 2009-01-13 15:08:39  mMarketGroup        = 11929 2009-01-13 15:08:39  mEmailAuthenticated = 1231859319 2009-01-13 15:08:39  mTouched            = 1231859319 2009-01-13 15:08:39 User added to database with ID 15.

—And 09:58, 14 January 2009 (UTC)

Help please! Sysop users dont have permissions!
Hello, i need urgent help, i installed mediawiki on my server, for some reason my admin account does not have any access to special pages like the sidebar and userrights page. says i need to be in the group. I AM in the group. Help help help please!
 * MediaWiki version: 1.13.0
 * PHP version: 5.2.6 (apache2handler)
 * MySQL version: 5.0.67

And 16:20, 19 January 2009 (UTC) This appears to be related to my problem immediately above - which I have now reported as Bugzilla Bug 17077 - I suggest you watch that as I've not had any response here.

Formatting problem after installing extensions
Product Version MediaWiki 1.14alpha (r45489) PHP 5.2.4-2ubuntu5wm1 (apache2handler) MySQL 4.0.40-wikimedia-log
 * URL: http://www.trialworks.com/wiki

After I install certain extensions, such as: require_once("extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php"); require_once("$IP/extensions/embed_document.php");

The font's all over the Wiki site appear bigger, affecting formatting. It's almost as if someone zoomed in to 125% size. If I add '#' to those lines it stops them from working, and returns to the layout to normal.

Not quite sure what keywords to search to even figure out what it may be. This is my first experience with MediaWiki.

—208.105.172.170 14:54, 15 January 2009 (UTC)


 * I took a quick look and seems that a PHP file - or maybe even two - is adding a BOM into the generated HTML output. Usually the first line of a page's HTML source code is like this: . Unfortunately on your wiki, something is adding a BOM before the first < tag. To remove the BOMs, you'll need a hex editor of some kind (I use the hex editor plugin for Notepad++) and then comes the tough part - you'll need to track down the files that have a BOM. It might be possible that it's either SyntaxHighlight GeSHi's some file or then it could be LocalSettings.php. -- Sayuri 13:34, 16 January 2009 (UTC)

—
 * That's Brilliant! I use Microsoft Expressions to edit various parts of the site (find it easy) and I used it to edit the PHP files. Although I do not see the line I am sure it's there, Expressions tries to put it in as a default.  Thank you!!!


 * Quick update: I took the LocalSettings.php originally made with Expressions, copied it to Notepad, made a new file, and overwrote the original.  Problem resolved.  - Thanks! Karl@trialworks.com

SQL Error on Extension:MantisIntegrations

 * MediaWiki version: 1.13.3
 * PHP version: 5.2.8 (cgi)
 * MySQL version: 5.0.68-log
 * URL: http://www.gestioneacquario.org/wiki/index.php?title=MantisTest/it

Hi all, hi would like to use the Extension for Mantis Integration. I Installed the extension how described, but when i try to use it i got error shown on the page of my site. Can anyone help me?

THanks

—Marcolino7 02:04, 17 January 2009 (UTC)

MediaWiki Extensions & Profiles

 * MediaWiki version: 1.13.2
 * PHP version: 5.2.8 (cgi-fcgi)
 * MySQL version: 4.1.22-max-log
 * URL: http://www.superwikia.com/wiki

Apparently their is a version conflict with the copy of MediaWiki that I am using and the extensions provided on all MediaWiki sister sites. I have the nightly release for 01/16/09 yet none of the extension have been installed properly. Also, as a general inference; the profile skins and other factory installed extension are not active. No adjustments can be made or images uploaded as well.

Please assist in this matter for the project is on a time sensitive basis.

Thank you...

—Habatchii 03:36, 18 January 2009 (UTC)