Project:Support desk/old

Common.js
When I try to edit Common.js in my own wiki, I get the following message:

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: (SQL query hidden) from within function "Title::getInterwikiLink". MySQL returned error "1267: Illegal mix of collations (cp1251_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '=' (localhost)".

--Andysoft 09:50, 10 July 2007 (UTC)
 * Has this been resolved?

Error: HTML tags on page
Hi! I wish to make copy Wikipedia in a local network. Has established MediaWiki, some extensions, however some pages are displayed incorrectly. For example, as here. What expansion is necessary for establishing, that clause showed correctly? Whether there Is somewhere a list of extensions with which works Wikipedia?--82.200.96.1 23:38, 10 July 2007 (UTC)
 * See http://en.wikipedia.org/wiki/Special:Version

External link is rendered strangely in IE 6.
If an external link text span a line, the rendering of a tiny icon indicating external link seems to mess up. Anyone have the same experience? [http://www.mediawiki.org Here is the example of an external link which line wrap causes an external icon link to disapper ............. ............... ................ ............. .............. ............... ................... ...... ..................]


 * Yeah, I have the same on IE7. See if it's been reported in BugZilla - if not, go ahead and report it.

Memory Leak on Win2k?
I've just installed the latest version of MediaWiki on my Win2k server (please, no giggling) and was suprised to find that PHP started throwing "Fatal Error: Out of Memory" errors and delievering blank pages, not just on the Wiki site, but on all PHP pages on the server.

Now, I did some Googling around and found that a bunch of people banished this error by upping thier PHP memory_limit from 8M to 32M. This elicits nervous laughter from me, as I've had that nailed at half a GB for years now -- the hardware handles it fine. I'm running PHP 5.2.1 and the server has been faithfully serving fairly intensive PHP pages for years prior to the introduction of Wiki. Removing the MediaWiki software makes the problem vanish.

Anyone have any ideas here?

Expiry question
When using protection expiry, how do you format the expiry field?

Thanks, Matt 71.126.156.74 22:52, 21 July 2007 (UTC)
 * GNU Date format (there are various options) - this is a common format: 2005-12-25 00:56:27 GMT

Problem of sending confirmation email through SSL
OS: Windows XP SP2 MediaWiki: 1.10.1 PHP: 5.2.3 (apache2handler)

extension=php_apc.dll extension=php_gd2.dll extension=php_mbstring.dll extension=php_mysql.dll extension=php_mysqli.dll extension=php_sockets.dll

PEAR install --alldeps mail

$wgSMTP = array( 'host'    => "smtp.gmail.com", 'IDHost'   => "username@gmail.com", 'port'     => 465, 'auth'     => true, 'username' => "username", 'password' => "password" ); SSL and 465 port are required by Gmail. Long time after I started sending the confirmation email, no result is returned. I looked into its network connection with netstat, finding that Apache did connect to a Gmail server (such as po-in-f109.google.com:465). Then of course, timed out, and a blank page is returned.

I've already searched for this at mw and meta with all kinds of methods, but no similar problem is found. So is there anyone to help me out? Sicaral 02:18, 22 July 2007 (UTC)
 * Are you able to send via non-ssl, port 25 smtp? Also, have you tried using your hosting service's SMTP server rather than googles?

Moving the Logo
How do I move the logo to the left, eliminating that small margin between the left edge of the logo and the left edge of the page?

How to keep sans-serif font when printing?
All mediawiki pages appear sans-serif eg. like Arial. But when I print a page either the standard or printable version, the print out uses a serif font, like Times Roman. How can I stop this? I want my printed page to look like it does on the screen. 220.244.88.206 05:32, 25 July 2007 (UTC)


 * Edit the printing stylesheet, which can be found in skins/common/printable.css or similar. robchurch | talk 20:41, 25 July 2007 (UTC)
 * Thanks - but that doesn't seem to work. I edited skins/common/commonPrint.css, the only thing mentioning font type was the line span.texhtml { font-family: serif; } which I've tried changing to sans-serif as well as commenting it out.  Neither makes any difference.  I'm using Ctrl+Refresh on my page after each change.  I notice in the HTML source of the printable version of the page a line /*<![CDATA[*/ @import "/wiki/skins/monobook/main.css?7"; /*]]>*/ . Perhaps I need to change the media tag to something else?  I don't know how to change this though.
 * Are you still having problems w/ printable versions showing up in a serif font? Or has this been resolved?

MediaWiki & DB2 support
Hi,

I’ve been developing a plugin for the MediaWiki to support DB2.

1) I’ve written a PHP program that converts the database from MySQL into DB2 (it creates tables identical to the tables in MySQL database and moves the data there)

2) I found that all connection to the database is done in the Database.php. I’m planning to use functions such as db2_connect (from PHP) as they are very similar to mysql_connect. I’ve also written my own functions using db2_connect… that have almost the same signature as mysql functions (I’ve done it in order to eliminate almost any differences between DB2 and MySQL in order to decrease number of changes in the current MediaWiki code. Basically I want to replace mysql function with function that I wrote without making any other Major changes in the MediaWiki code).

However, I’ve noticed that SQL statements in MediaWiki are build dynamically in many steps and placed in different files, which are very hard to track. And I’m not able to use MySQL statements directly as DB2 have slightly different syntax. For example it doesn’t accept a quoted integer in the ‘WHERE’ clause.

My question is there any particular structure how the SQL statements get build in the MediaWiki? I’ve tried to search the MediaWiki code, but I couldn’t find any consistency and I don’t want start guessing, because I need MediaWiki to be stable.

Please help!!!
 * Wouldn't it be more efficent to write a MySQL > DB2 SQL Cleaner function? And just preg_replace all the MySQL style stuff that conflicts w/ DB2?  How many syntax differences are there? Or is that crazy talk?

File Extensions Problem with 'mm'
Hi, My problems is with File Extensions. I hope that I can get some help here. I've edited my wgFileExtensions[] array to add in the new office file formats mm (for MindManager) etc. One of the users at the company I work up loaded a mm file format. Now every time you click Upload to upload this fileformat warning The file is corrupt or has an incorrect extension. Please check the file and upload again..

Things I've did.

1. LocalSettings.php
 * add the line   include("$IP/extensions/FreeMind.php");   placed on the end of this file.

2. Install the Plugin -rwxrwx--- 1 root   www    175 2006-07-09 07:33 README -rwxrwxrwx 1 lorenz users 6484 2007-07-26 12:11 FreeMind.php drwxrwxrwx 2 lorenz users  464 2007-07-26 12:12 freemind lorenz@dehgbnet0005:/srv/www/htdocs/pdm-wiki/extensions>

3. for additional information, here the settings in LocalSettings.php $wgEnableUploads               = true; $wgMaxUploadSize               = 1024*1024*1024*10; $wgUseImageResize              = true; $wgUseImageMagick              = true; $wgImageMagickConvertCommand = "/usr/bin/convert";
 * 1) To enable image uploads, make sure the 'images' directory
 * 2) is writable, then set this to true:
 * 3) Lorenz !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'ogg', 'zip', 'doc', 'ppt', 'pdf', 'xls', 'mdb', 'mm', 'mmap' ); Can someone help ??? Thanks and Bye Michael
 * 1) Lorenz !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 * 2) File type extensions allowed
 * Enable the debug log (Prefferable while nobody else is using it) on your wiki, then upload one of the problematic files (or is it ALL files?) - and paste the failure line (NOT the whole log - it's huge) in here. It should look something like this:

MimeMagic::MimeMagic: loading mime types from includes/mime.types MimeMagic::MimeMagic: loading mime info from includes/mime.info MimeMagic::detectMimeType: magic mime type of /tmp/phppUIiOH: image/png MimeMagic::guessMimeType: final mime type of /tmp/phppUIiOH: image/png SpecialUpload::verifyExtension: mime type image/png matches extension png, passing file
 * Yours is failing in that area - that mime matching is where the "corrupt file" error comes from. To enable debug log, add this line to the bottom of your LocalSettings.php: $wgDebugLogFile = "$IP/MWdebug.log"; Your debug file will be in your Wiki root and called MWdebug.log *** make sure to turn debugging off asap! --Tim Laqua 14:08, 29 July 2007 (UTC)

Several questions

 * Broken spanish text removed, see the diff for the original posting. -- :Bdk: 22:15, 26 July 2007 (UTC)

This comment has an approximate (but maybe not accurate) translation to english at the bottom. Excuse me for my bad english. --El Racionalista Prenihilista 20:04, 26 July 2007 (UTC)

Where can i download a "user manual" about mediawiki
in order to edit the pages with greater theoretical knowledge, obtaining a better performance creating and editing those pages? If this manual doesn't exist, please do it as friendly as possible, for those of us whose have basic knowledge in programming. It would be rather to wikipedia it be this way, in order to expand its possibilities. --El Racionalista Prenihilista 20:04, 26 July 2007 (UTC)


 * Doesn't exist in a document that you can download in a single document. Currently it is spread throughout the pages here in MediaWiki.org --Dr DBW 02:48, 30 July 2007 (UTC)

wikiversidad: Music Notation
i'm actually working on some projects in "wikiversidad" (yes, in spanish lol) and i need the ability to create the pages in music notation At a first glance, we have thought trying to convert the sheet music into images, after it then upload them in commons and make a link in the page to that image. Because the project is related to music, it is unavoidable to listen the music score, we'd have to do exactly the same way  for every music file; on the other hand, it is neccesary for all the users (and attending to the wiki policy) that editing the scores in the page from existing mistakes be possible... but because of they are in an image format the users should repeat all the process over and over. As it could be seen, this way could be easily turned into a mess. For that reason it is necessary that a code be implemented in order to write the sheet music directly in the page and this code also allow (just as lilypond or any music notation software does) to listen what is written in the page. I was reading about a language called "wikitex" or somethng like that; i tried to use the code according to this lenguage but it didn't work. I used the code according to lilypond especifications and nothing happened (well, it appeared as text in the page, lol), even so it was said in the wikitex page that we cand improve our articles by using that code. Summing up, it would be a good idea to implement a language, a tool, a code (or whatever it be the name that the developers give to it) that can do that functions just mentioned, this only if it's desirable to make wikiversity (wikiversidad) a real learning project. Another Suggestion is to have the ability to listen simultaneously to the sheet music we are just watching in the page. It will be an enormous learning tool. --El Racionalista Prenihilista 20:04, 26 July 2007 (UTC)


 * This the code / extension that allows music to be put into wiki pages Wikitex. It should work, may be ask the developers why yours is not. --Dr DBW 02:48, 30 July 2007 (UTC)

It is supposed to work....but it doesn't work. I mean, it work on the page of wikitex, but only in that page. :S --Johann 14:24, 31 July 2007 (UTC)

Can you tell me how to embed the page "wikisophia.org" to partially fix the problem with the music notation??
Thank you for your answers --El Racionalista Prenihilista 20:04, 26 July 2007 (UTC)

Is there a bug related to template-trascluding in MW 1.10.0 and 1.10.1?
I have several instances of MW running and there is a behaviour while inserting templates from a central pool I cannot explain myself. E.g. there is a central instance let's say foo1.bar.tld and another one let's say foo2.bar.tld. And now I want to use a template hosted by foo1.bar.tld using the designated way while foo1 is the right interwiki link. (yes, iw_trans is set and scary transcluding is turned on). So here is my problem:

Instances which are based on MW 1.10.0 include that templated but wiki markup within the template is ignored. Html markup works fine. Instances based on MW 1.10.1 show something like UNIQ1e69a7ad64e3f598-item140b0119235f4147 instead the included template.

Is there anyone out there who can explain that behaviour to me? --195.145.211.194 07:19, 27 July 2007 (UTC)

Can I be a "counselour" on the implementation of the music notation software?
If it is the case that i can't be a counselour or anything like that, I'd like to make the following suggestions:


 * 1.- Use exactly the same language that lilypond uses (not similar, the same). Being this way we don't have neither to learn new languages nor shift the way we are used to input music. It diminishes the difficulties in making new learning projects.


 * 2.- Allow the possibility of opening links in new pages according to the will of who is editing the project. This make possible many things about playing some kind of multimedia...and the ability to see different pages simultaneously makes some learning processes be easier, especially in musical matter.


 * 3.- Make the pupil able to listen to the music that is written at its own will. For example, if we want to show the sound of every note of the diatonic scale, the person who is learning it should have the option to play that sound at its own will and skill without loosing the view of the current page. He(or she)needs to listen and look simultaneously to learn properly.--Johann 16:33, 27 July 2007 (UTC)

Installation Problems on pytal.de
First of all this is my installation process:

''Please include all of the lines below when reporting installation problems.


 * PHP 5.2.3 installed
 * Found database drivers for: MySQL
 * Warning: PHP's safe mode is active. You may have problems caused by this, particularly if using image uploads.
 * PHP server API is cgi-fcgi; using ugly URLs (index.php?title=Page_Title)
 * Have XML / Latin1-UTF-8 conversion support.
 * Session save path (/srv/www/httpd/phost/s/com/pytalhost/sro-wiki/ses) appears to be valid.
 * PHP's memory_limit is 24M.
 * Couldn't find Turck MMCache, eAccelerator, or APC. Object caching functions cannot be used.
 * GNU diff3 not found.
 * Found GD graphics library built-in, image thumbnailing will be enabled if you enable uploads.
 * Installation directory: /srv/www/httpd/phost/s/com/pytalhost/sro-wiki/web/wiki
 * Script URI path: /wiki
 * Environment checked. You can install MediaWiki.
 * Warning: $wgSecretKey key is insecure, generated with mt_rand. Consider changing it manually.

Generating configuration file...
 * Database type: MySQL
 * Loading class: DatabaseMysql
 * Attempting to connect to database server as phost78105...success.
 * Connected to 5.0.32-Debian_7etch1
 * Database phost78105 exists
 * Creating tables...Query "CREATE TABLE `wiki_job` ( job_id int unsigned NOT NULL auto_increment, job_cmd varbinary(60) NOT NULL default , job_namespace int NOT NULL, job_title varchar(255) binary NOT NULL, job_params blob NOT NULL, PRIMARY KEY job_id (job_id), KEY (job_cmd (160), job_namespace, job_title (160)) ) TYPE=InnoDB " failed with error code "Incorrect sub part key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique sub keys (localhost)".

I try to host mediawiki (new version) on www.pytal.de They are telling me to change some stuff:

1. open \includes\AutoLoader.php - #line 5 ini_set('unserialize_callback_func', '__autoload' ); to   @ini_set('unserialize_callback_func', '__autoload' );

2. open \maintenance\tables.sql - #line 467 cl_sortkey varchar(86) binary NOT NULL default '', to   cl_sortkey varchar(78) binary NOT NULL default '',

#line 1061 KEY (job_cmd, job_namespace, job_title) to   KEY (job_cmd (160), job_namespace, job_title (160))

#lines 1122-1124 pr_type varchar(255) NOT NULL, -- The protection level (Sysop, autoconfirmed, etc) pr_level varchar(255) NOT NULL, to   pr_type varchar(160) NOT NULL, -- The protection level (Sysop, autoconfirmed, etc) pr_level varchar(160) NOT NULL,

but i cant find line 1122-1124, it looks like this:

pr_type varbinary(60) NOT NULL, -- The protection level (Sysop, autoconfirmed, etc) pr_level varbinary(60) NOT NULL,

'''when i just change the 60 to 160 it looks like i posted on top! when i start the installation again (without deleting the tables he create on first try) installation go to the end, but i cant use the Admin-LogIn from installation-config.

Anyone know how to fix this???'''

--217.238.126.133 01:08, 29 July 2007 (UTC)


 * What error do you get if you try to run the installation WITHOUT making those changes they suggested? Try using the stock installer with no modifications.  The line 467 change on the "job" table creation is causing that particular error - but your mention of the page_restrictions tables - those match lines 1122-1124 in the MW 1.10.x tables.sql file.  Are you installing MW 1.10.1? --Tim Laqua 01:40, 29 July 2007 (UTC)

Deleting Page - Nothing Happens, Does not Delete
When logged in as a sysop user, the Delete link is there for the page, but when I click on the "Delete" button on the "Confirm Delete" page, nothing happens. It appears to just reload this "Confirm Delete" page and does not delete the intended article.

Any suggestions greatly appreciated

--216.86.181.69 08:41, 29 July 2007 (UTC)
 * Has this been resolved?

How can I link to other format URLs in my wiki?
like ftp://, \\192.168.1.1 etc.


 * You'll notice above that MediaWiki has attempted to render the FTP link;  ftp://  is a recognised URL protocol; see $wgUrlProtocols in includes/DefaultSettings.php for the others.


 * The other link is a UNC link which would equate to a local "file" under Windows, and thus use  file:// </tt>, e.g.  file://\\192.168.1.1 </tt>. It's possible to add this to the URL protocol list, however, a lot of modern browsers, including Firefox and Opera, won't render these for "security" reasons. This may or may not be configurable on the client. robchurch | talk 02:35, 30 July 2007 (UTC)
 * In Firefox you can configure UNC links like this. Maybe you want to try Extension:FileProtocolLinks as well. --Flominator 11:24, 30 July 2007 (UTC)

Problem with mySQL
I received this error. Please help me to fix it.

Sorry! This site is experiencing technical difficulties. Try waiting a few minutes and reloading. (Can't contact the database server: MySQL functions missing, have you compiled PHP with the --with-mysql option? )

http://resg.com.au/rhwiki/

Regards, 203.22.70.5 02:09, 30 July 2007 (UTC)


 * PHP's MySQL functions have apparently gone AWOL, which means MediaWiki won't be able to access the database. This may indicate a change in your configuration, or some other breakage.


 * If you're responsible for managing the server, then follow the instructions on the PHP web site to ensure MySQL is compiled into PHP or otherwise enabled; if not, then please ask whoever is responsible to check the same. robchurch | talk 02:30, 30 July 2007 (UTC)

Rename Wiki
I have downloaded and installed the latest Media Wiki and started a wiki. Will I be able to rename the Wiki without having to start again or lose data etc? Thanks! 217.44.96.203 02:29, 30 July 2007 (UTC)


 * Rename in what manner? You can change the site name using $wgSitename</tt>, but are advised to add a namespace alias from the old name to the project namespace, to prevent link breakage, e.g.


 * $wgNamespaceAliases[' '] = NS_PROJECT;</tt>


 * You can move the wiki to another directory or server, but don't forget to update the paths set in LocalSettings.php</tt> - see Manual:Moving a wiki for more information on that. You can rename the database, but again, don't forget to update LocalSettings.php</tt>, changing the value of $wgDBname</tt> as needed. robchurch | talk 02:32, 30 July 2007 (UTC)

Mediawiki in sub directory
Hi dear wiki-ers, I havce a drupal site, and I wanted to add a wiki. I've installed Mediawiki in my site under a subdirectory (i.e. public_htmp/wiki) and having trouble with enabling the "nice URLs. I can get the .htaccess to resirect mysite.com/wiki to go to the wiki so the browser actually returns http://www.mysite.com/wiki/index.php?title=Main_Page when I acecss http://www.mysite.com/wiki . by for some reason, if I enable nice urls as described at here, the nice URL get rerouted to the drupal site. Thansk in advance, Udijw 13:03, 30 July 2007 (UTC)
 * Has this been resolved?

Deaktivate Discussion
Hi,

how can i deaktive Discussion all-over the Wiki?

Thanks

--91.17.110.223 13:20, 30 July 2007 (UTC)
 * Just hiding the discussion tab is a pretty common and simple tweak. Edit MediaWiki:Common.css in your wiki and add:
 * #ca-talk { display: none !important; }</tt>
 * #ca-talk a { display: none !important; }</tt>
 * So the talk pages exist, but there's no discussion tab - which is usually "good enough."
 * --Tim Laqua 14:43, 30 July 2007 (UTC)

Greate it Works Discussion are deaktivet (i put it direkt in my CSS file), well nobody see :-)! Thanks, but if i Login in my Profile i can see "My Discussion" were are the difference between "My Discussion" and "Discussion" ? 91.17.95.145 19:09, 30 July 2007 (UTC)
 * Use this instead then (remove the other two lines you put in earlier). This will disable general Discussion and "My Talk"
 * #ca-talk, #pt-mytalk { display: none !important; }</tt>
 * BTW, the difference is the classes and IDs they're using - cat links are across the top, and the pt links are the "user" links in the upper right of Monobook.
 * --Tim Laqua 19:14, 30 July 2007 (UTC)

Only registered users create and edit page
how can i do this ? just registered users can create and edit page ? i didnt see any page about this...

--85.102.216.150 14:41, 30 July 2007 (UTC)
 * See Manual:Preventing_access

about wikimedia settings
i installed mediawiki but i want only registered users create and edit pages... i didnt see this option in settings how can i do this ? sorry for english and first question --85.102.216.150 15:16, 30 July 2007 (UTC)


 * Edit LocalSettings.php and add the following lines to the end - before the closing ?>
 * $wgGroupPermissions['*'   ]['edit']            = false;</tt>
 * $wgGroupPermissions['*'   ]['createpage']      = false;</tt>
 * $wgGroupPermissions['*'   ]['createtalk']      = false;</tt>
 * $wgShowIPinHeader = false;</tt>
 * That should take care if it. --Tim Laqua 15:28, 30 July 2007 (UTC)


 * If there's a ?&gt;</tt> at the end of the file, remove it; it's useless, and makes appending to the file a bit less convenient. robchurch | talk 22:18, 30 July 2007 (UTC)

a really blank page
Since a few days I have a tricky problem: It is impossible to save a page with special characters like äüöéè and so on ... After, I click "save page" the browser shows a white page. There is no content, nothing from mediawiki or other information. I can only see the browsermenu and the tapbar (firefox), that's all. Nice, isn't it?

My server is an opteron-system with openSuSE 10.2 and all patches. I have never installed own packages for apache, php, mySql, ...

Does someone have any idea?

--84.58.139.249 18:26, 30 July 2007 (UTC)


 * A blank white page indicates a PHP error which isn't being printed to the screen. To force this, add the following lines to the LocalSettings.php</tt> file, underneath the &lt;?php</tt>:


 * You can also set a value for <tt>error_log</tt> in <tt>PHP.ini</tt> and read the PHP error log to find out what's going on. In some cases, PHP errors might also be recorded in the web server error log. robchurch | talk 21:55, 30 July 2007 (UTC)

Thank you for your hint. I got error-messages. In logfile: [Tue Jul 31 18:33:05 2007] [error] [client 192.x.x.x] ALERT - script tried to increase memory_limit to 62914560 bytes which is above the allowed value (attacker '192.x.x.x', file '/srv/.../LocalSettings.php', line 25), referer: http://.../index.php?title=New_test_page&action=edit [Tue Jul 31 18:33:05 2007] [error] [client 192.x.x.x] PHP Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 74 bytes) in /srv/.../includes/GlobalFunctions.php on line 1995, referer: http://.../index.php?title=New_test_page&action=edit The same error appears in the browserwindow: Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 74 bytes) in /.../includes/GlobalFunctions.php on line 1995
 * It looks like, some functions of php or an other system have problems with memory if I try to store special characters. What can I do to find those problems?

--84.58.161.208 16:56, 31 July 2007 (UTC)


 * I'm going to hazard a guess here that the additional memory usage is due to the use of a fallback function to count the number of multi-byte characters in a string. We would typically do this with the <tt>mb_strlen</tt> function, but where the multi-byte string functions for PHP haven't been compiled in or otherwise enabled, we provide a safe fallback which does the job, although it uses a slower method based on a dumb regular expression match.


 * Probably the best solution here is to make the multi-byte string functions available (see http://uk2.php.net/manual/en/ref.mbstring.php), or convince the server administrator to do this on your behalf if you're unable to do so. Typically this can be done by recompiling PHP using <tt>--enable-mbstring</tt> under Unix/Linux, or by enabling the <tt>php_mbstring</tt> extension module under Windows. robchurch | talk 20:38, 31 July 2007 (UTC)

Accountsettings
Hello,

I will use the mediawwiki software as Intranet.

Is it possible to change the Accountsettings, that every user musst aktiviate by an Administrator?

Sry for my bad English und Thank you for the answer.

Phillip


 * Yes, you have to disable all implicit rights and then MANUALLY grant the rights (or "activate") each user. NOTE - You will also have to make Sysops Contributors - NO ONE will have edit rights unless they have been put in the Contributors group (Special:Userrights to manage Groups) - Put the following lines at the end of your LocalSettings.php file (before the closing ?>)


 * Good luck! --Tim Laqua 19:01, 30 July 2007 (UTC)


 * Alternately, disable account creation and have the sysops create accounts for people who need them. You would then only need to add:


 * You could also use Extension:ConfirmAccount. Prodego 19:19, 30 July 2007 (UTC)


 * That's not nearly complicated enough. ;-) --Tim Laqua 19:49, 30 July 2007 (UTC)


 * Actually, all you need is this <tt>$wgGroupPermissions['*']['edit'] = false;</tt>, which is what I use on my 1.0.3 MediaWiki--and I can't create/edit anything as an anonymous user. Unfortunately, this permission doesn't allow unprotected page source text to be viewed, which I'd like to allow without having to do a mass page protection... -Eep² 20:09, 30 July 2007 (UTC)


 * 1.0.3?!?! Nice.  If someone registered an account, the DefaultSettings.php permissions assignment gives "user" edit rights.  * doesn't over-ride explicit permissions in other groups.  (as far as I know) - perms definately changed between 1.0.3 and 1.10.1  --Tim Laqua 20:25, 30 July 2007 (UTC)


 * It occured to me that you meant 1.9.3 - yeah, that works to disable anon edits, but this guy is trying to force sysop "activation" --Tim Laqua 20:31, 30 July 2007 (UTC)


 * Yea, sorry, I meant 1.9.3. ;) I still don't know why I downloaded that version when 1.10.1 was available. Ah well...brainfart, I guess. Anyway, do you know how to allow unprotected pages to allow "view source" if anonymous users can't edit pages? -Eep² 09:25, 31 July 2007 (UTC)
 * I don't think so. Looking at the code, there doesn't even appear to be a very straight-forward way to hack it in to submission either.

Session-data lost error
If I am logged on as sysadmin, I couldn't change articles, specially mediawiki:sidebar. What is wrong? medaiawiki says, that session-data had been lost. What ist wron? Although it is not possible to change user-roles. I have PHP 5.2.3 and MySQL 5.1. I spent almost 3 days with that Problem. Please let me know your experince at mailto:martin.schlederer@t-online.de

--84.151.97.8 22:09, 30 July 2007 (UTC)


 * Per rob's comment above and in Archive1 (Project:Support_desk/Archive1) - check to see if your session.save_path value in php.ini is valid and writable to the webserver - PHP configuration.

SessionPath
When i tried to install MediaWiki the first time, there was a report: "Your session save path appears to be invalid or is not writable. PHP needs to be able to save data to this location in order for correct session operation. Please check that session.save_path in PHP.ini points to a valid path, and is read/write/execute for the user your web server is running under."

I checked session.save_path in php.ini (i've got root access to the server) and in was pointing to /var/lib/php/session/. I've set chmod for /var/lib/php/session/ to 777. Then i tried to install MediaWiki again. Installer reported me the same.

--85.141.91.40 23:26, 30 July 2007 (UTC)
 * Has this been resolved? 777 on the session.save_path should definately take care of it.

Page for each variable, function, etc
I just created wfMsg (which may need to be moved to Manual:wfMsg or Manual:wfMsg) for the function of the same name. I think there should be an article/page for each MediaWiki variable (such as already exist for Manual:Configuration settings) and function. -Eep² 14:58, 31 July 2007 (UTC)
 * I agree - but why post here? Wouldn't that be in a Manual discussion of some sort?  If not... lets make a Manual Discussion.  ;-)


 * If we're going to have pages about each function (which I think is a bad idea, development documentation should be in doc blocks in the code, or in files with a general overview of how to do things in <tt>mediawiki/docs/</tt>) then it ought to go in a separate namespace; it's not part of the user manual, and shouldn't be in the main namespace. robchurch | talk 20:31, 31 July 2007 (UTC)


 * Well, there's the Doxygen documentation (http://svn.wikimedia.org/doc/) but it's incredibly clunky to use and almost as bad as actually opening up the class files and hunting through them. So you're thinking of a Documentation: namespace?  I understand the objection as it creates a redundant data stores - but say I wanted to know the syntax for wfMsg right this second.  Where could I type "wfMsg" and get the answer?  I think that's the problem.  I don't think inline func defs do the entire job and I don't think manually replicating all of that data in a Documentation: namespace does it either.  Though, at least the Documentation: namespace would allow me to search for "wfMsg".  (and grepping for wfMsg is my current solution - I just don't thing that inline func defs are "adequate documentation").


 * That entire site should be moved to this wiki. I can't find any way to search it (other than Google, of course) and all of the functions are crammed into long lists, making the pages load slow and lag from all the "reference by" links (in Firefox anyway). There are no "functions by type" or whatever categories and the site just isn't very user-friendly. I do like being able to see the code of the various PHP files and links to various functions/variables though. :) -Eep² 04:13, 1 August 2007 (UTC)

Recording Username insted of IP address for page edits while not logged in.
--192.104.67.222 17:21, 31 July 2007 (UTC) Is it possible to change the settings of the wiki to record a username insted of an ip address for page edits? I would like to be able to log the username from Active Directory for my wiki insted of the IP address. I have my wiki in a corporate evironment.

Thanks in advance, Tom
 * Your users would have to log in - MW can't poll the client for the logged in user. See Extension:LDAP Authentication - We use that on our internal wiki against a w2k3 AD.  Also, we disabled anonymous edits, so the users all have to log in once (using their domain user and apssword), check "remember login" and they're good to go.  (assuming roaming profiles or static workstations).

CSS Mediawiki with no Logo
i made my one Skin based on Monobook, but i dont find the line were i can put the Navigation up. I clean the p-logo line in "monobook.php" an the CSS but the Navigation would not come up.

--91.17.123.33 20:33, 31 July 2007 (UTC)

Capturing new/updated pages being created in a external database
I have a external database (actually its on the same box just not in the mediawiki db) that when someone creates a new page or updates a page on the wiki then it inserts a record into my database. I can not seem to find in the php files the code that actually does the updating and inserting of the data in the database. Can anyone help point me to this location? I am using the newest version of mediawiki but I am sure the code will be in approx the same spot on different versions of the wiki.

--143.166.226.40 22:40, 31 July 2007 (UTC)
 * Use the ArticleSaveComplete hook and write an extension - it is called everytime an article is successfully inserted or updated. http://www.mediawiki.org/wiki/Manual:MediaWiki_hooks/ArticleSaveComplete

I tried to make this change and I added the following code into my LocalSettings.php file but it appears it is never called. Do I need to add this somewhere else? $wgHooks['ArticleSaveComplete'][] = 'fnMyHook';

function fnMyHook(&$article, &$user, &$text, &$summary, &$minoredit, &$watchthis, &$sectionanchor, &$flags) {	$dbh = mysql_connect($wgKBserver, $wgKBuser, $wgKBpassword) or die("Unable to connect to MySQL"); die("Connected to MySQL"); // you're going to do lots more here soon mysql_close($dbh); } --143.166.255.40 15:01, 1 August 2007 (UTC)
 * It gets called when you click Save after editing a page. I just tested it on a MW 1.10.1 installation - here's the function I tested it with.  (I just put it at the bottom of my LocalSettings.php)


 * w/ this hook, you'll just get the dingI'mdead. screen whenever the hook fires. (and it does indeed fire after saving an updated article or new article.

Thank you, you were correct. It appears that if you just edit a article without changing any text and saving it, that it does not call the ArticleSaveComplete. One last question and I should be done. If I am connecting to another database in the php code, is there a way I can have it connect back to the wiki database? When I use the below code I get php errors after it inserts the record because it took over the connection to the wiki database.

--143.166.255.42 16:02, 1 August 2007 (UTC)
 * Have you tried adding <tt>return true;</tt> to the end of your function?
 * Otherwise, I have no idea - I've never initiated a separate connection. Most extensions simply create another table in the existing wikidb.  then use the wfGetDB( DB_MASTER ); function which uses the global Database class (stored in Database.php).  Here's an example:


 * note - this function uses the tableName method to get the 'real' name of the user table - this is because users can set prefixes to tables and such. You would just update or insert on your table name.  As for the whole getting the wikidb connection back question - I don't know - the Database class in Database.php is the one that handles the connection, so an answer might be in there.  Let me know if you or anyone else knows/figures it out.

Well I tried what you suggested along with other items and I am still not able to get it to work. I understand that most people use the same database but mine has to goto a different server. I do connect to the other server and able to process the data. What it appears is that I am canceling the connection to the mySql server the wiki is using. I tried to add $dbw =& wfGetDB( DB_MASTER ) at the end of my function but I still get the same errors. The error is

Warning: mysql_real_escape_string: 33 is not a valid MySQL-Link resource in C:\Inetpub\wwwroot\wiki\includes\Database.php on line 1607 and Warning: mysql_query: 33 is not a valid MySQL-Link resource in C:\Inetpub\wwwroot\wiki\includes\Database.php on line 779

I tried looking all thru the database.php file to see if there was some function that tells the software to connect to the database but I could not find anything. Does mediawiki have a function that I can just call if i wanted to connect to the database or how exactly does this happen?

--143.166.255.42 19:43, 1 August 2007 (UTC)


 * Try using the ArticleSave hook instead of the ArticleSaveComplete hook - between when ArticleSave and ArticleSaveComplete fire, the database connection is created in doEdit of Article.php . Make sure your function returns true!  If your function does not return true on an ArticleSave hook, the edit will NOT happen.  Input is the same for both hooks.

Well I really dug into this following the functions around and I found out that the wfGetDB will reopen the connection to the database if its not available. So to complete what I was trying to do, I closed the connection to the database and then it reopens at the end of my hook. Everything appears to work unless I am missing something. Can someone verify that this should not cause any problems and that I am reading it correctly that wfGetDB will reopen the connection? Below is the code I am using so someone else can benefit from my trials


 * I thought you already tried adding that wfGetDB call and it didn't resolve the issue? But it looks good - the MW connection is idle because the execution of that hook is linear - there are no other processes using the connection while you are inside your hook function. So as long as that solution re-establishes the connection (evident by the fact that it's not throwing mysql_query errors post-hook execution), that's a cool little extension.  ;-)  If you want more feedback on it, you can post it as an Extension: page and explain that it's a "Proof of Concept" extension.  Most people will comment on specific Extension methodology on the Extension's talk page.

Custom color of namespaces
I'm sure it's hidden somewhere, but I wasn't able to find it: How do I change the background-color of one specific namespace? Regards, --Flominator 10:48, 1 August 2007 (UTC)
 * MediaWiki:Monobook.css
 * <tt>.ns-4 #content { background-color: #eef}</tt>
 * So Namespace 4 (Project) = pastel blue BG.
 * Awesome. Thx. --Flominator 08:44, 2 August 2007 (UTC)
 * Awesome. Thx. --Flominator 08:44, 2 August 2007 (UTC)

Permissions Question
I just had a quick question. How can I totally remove the login/registration features on the website, and make it so that anyone can post anything? Basically make it an "Open Wiki". I need to 1. Remove the register/login options. 2. Allow global permissions for people to do everything as guest (except edit the pages I marked as "Non-Editable". Any Advice?

--72.148.242.187 12:59, 1 August 2007 (UTC)
 * Add these lines to the bottom of your LocalSettings.php - that should give anonymous users the same rights that "registered users" would have and disallow user registration. There may be other "sysop only" permissions you want to grant to anon as well - just add them in on new lines and set to true as below.

// Implicit group for all visitors $wgGroupPermissions['*'   ]['createaccount']   = false; $wgGroupPermissions['*'   ]['read']            = true; $wgGroupPermissions['*'   ]['edit']            = true; $wgGroupPermissions['*'   ]['createpage']      = true; $wgGroupPermissions['*'   ]['createtalk']      = true; $wgGroupPermissions['*'   ]['move']            = true; $wgGroupPermissions['*'   ]['upload']          = true; $wgGroupPermissions['*'   ]['reupload']        = true; $wgGroupPermissions['*'   ]['reupload-shared'] = true; $wgGroupPermissions['*'   ]['minoredit']       = true; $wgGroupPermissions['*'   ]['purge']           = true;
 * To hide the Login/Create Account link, edit MediaWiki:Common.css in your wiki and add:
 * <tt>#pt-login { display: none !important; }</tt>
 * See Manual:Preventing access for further information

"offline" off server use of MediaWiki or similar possible?
From what is available about MediaWiki on en.wikipedia.org, that is currently not possible, but...
 * 1) Is it being planned in the future version?
 * 2) What are some wiki softwares that can be used off line and have similar editing syntax, wikiTeX like MediaWiki, etc?

--Organizex 17:38, 1 August 2007 (UTC)
 * What do you mean by "offline" and off server? As long as you can install a webserver (usually Apache2), MySQL, and PHP Supoprt, you should be able to get it going.  Do you want to use it in an internal netowrk?  Or like locally just on your own computer?


 * Yes, that is correct. Organizex 08:43, 2 August 2007 (UTC)
 * Which? Local Network?  Or just Your Computer?

HTML tags: what extensions?
The Wikipedia template w:Template:Infobox Ethnic group uses lots of  tags throughout, yet it just displays   on my setup, instead of (presumably) terminating that table row.

I have the same set up as above and the following extensions installed: Cite (Ævar Arnfjörð Bjarmason); Inputbox (Erik Moeller) and ParserFunctions (Tim Starling).

Is there another extension I have to install or is there some variable that allows the use of specific HTML tags that I have to set? Thanks in advance. --82.4.221.60 22:03, 1 August 2007 (UTC)
 * No, it's more likely that you're missing transcluded templates that the master template relies on. Look at the HTML source for the page that you're seeing (right-click, view source) and locate the area where you're seeing the   tags - there should be opening   tags for each one.  Also, look at the "Templates used on this page:" section when you edit the template - you need to ensure that any other templates the master template relies on also exists.  Generally speaking, it's not a good idea to try and use one of wikipedia's templates as they often have a large number of dependencies - it's best to examine their template and re-build it yourself to suit your needs.  Good luck.


 * Yeah, I had already included all the templates necessary (thankfully those templates didn't have other transcluded templates!). I had a look at the source code and I saw &lt /tr&gt (semi-colons removed) - I'm not familiar with either of those codes lt or gt, and I don't know why they'd be there. I'm guessing they're "less than" and "greater than".


 * I copied the template from Wikipedia and pasted it in. In the original wikicode, there weren't actually any opening tr tags either.. but the template there works. Presumably either the pipe or pipe-dash template is equivalent to the tr tag.

--82.4.221.60 06:46, 2 August 2007 (UTC)
 * Yup, it's the Pipe. They won't be actual html tags won't be created until the MW parser processes it.  ;-)

XAMPP Installation Problems
I recently setup XAMPP and extracted the mediawiki fodler into the proper location according to the setup instructions. When i goto http://localhost/mediawiki im gettin the 403 message Access Forbidden! Anyone know what i should look for to correct this? Thanks

--74.128.1.3 22:51, 1 August 2007 (UTC)
 * So this is the folder you copied the MediaWiki files to?
 * <tt>C:\Program Files\xampp\htdocs\mediawiki </tt>
 * and inside the mediawiki folder, you see LocalSettings.php and all the other files?

Edit thumbnails php files
Can someone can tell me where the GD functions are in mediawiki 1.10? I don't find them anymore in Image.php :s

Sorry for my bad english :$ --217.112.179.120 12:55, 2 August 2007 (UTC)
 * [wikiroot]/includes/media/Bitmap.php

Creating Thumbnails Not Working
Hello - I'm the webmaster of Zelda Wiki.org (http://www.zeldawiki.org/), and I continually experience a problem generating thumbnails. A thumbnail for any image can be created, so long as it does not deviate from the default 180 pixel setting. However, set your own pixel width, and it generates this message: Error creating thumbnail: sh: /usr/bin/convert: No such file or directory. I have not been able to find any solution to this, and am unsure of the cause. It began on roughly July 22nd, of unknown origin - I was away at the time, and was not able to manage the wiki to know if something had gone wrong.

Thanks for all the help! --Jason (aka GoldenChaos) 13:29, 2 August 2007 (UTC)
 * Try flipping ImageMagick off in LocalSettings.php and just letting it use GD for the convert. <tt>$wgUseImageMagick = false;</tt>
 * Thank you - that solved the problem. However, is there any specific reason why ImageMagick should stop working? Also, it appears that now some transparent PNG's have had their alpha channels made into black pixels. Oddly enough, some remain transparent. Is this something that "GD" does, or is it just an effect of switching the image renderer? --Jason 18:31, 2 August 2007 (UTC)
 * I've seen that many times w/ GD. I'm not 100% on why it happens - I would imagine it's a known bug.  You could take a look at bugzilla.mediawiki.org and see if the bug has been reported already (I didn't notice it in there) and if it's not, you can report it.  Otherwise, you can try to get ImageMagick working again - try to figure out what changed and why it stopped working.  Verify that /usr/bin/convert is indeed the ImageMagick converter - sometimes <tt>$wgImageMagickConvertCommand = "/usr/local/bin/convert";</tt> is the correct setting.
 * Ok, I figured it out. It's the GD lib w/ PNG-24 alpha trans.  Patch posted on SVN.

Inserting wiki pages using an external script
I've got a lot of pages of content that I'd like to insert directly into my wiki instead of manually creating them one by one. I was going to write a PHP script to handle it, but got stumped. I'm a little confused about the tables and fields that I need to edit as a minimum. I create a new page_id, and page_title... and the text needs to be put into old_text... but the revision table has me puzzled. Is there an easier way to achieve this?

--195.137.100.182 17:49, 2 August 2007 (UTC)
 * Are the existing pages from another wiki? If so, just export them and then import them in to the new wiki.  If they're not from another mediawiki installation, but just raw content - there are many ways to get the data in - but directly inserting the data in to the database isn't one of them - it's incredibly complicated. http://www.mediawiki.org/wiki/Manual:Database_layout What does your existing content look like?  Like, what format is the existing data in, where is it stored, etc - Then we can help you w/ a method for inserting it using the actual MediaWiki engine.  An extension for the import is one option (pry too much work for a small batch), or like a bot to do the inserts.  If it's a public facing wiki, someone could pry run the import using a bot for you.


 * I'm basically looking to convert an existing 'regular' database driven site into a wiki-based one. It's not a particularly small number of pages - around the 5 thousand mark, but I wasn't necessarily planning on doing them all at once. Data is in a MySQL db, mostly just plain text. Nothing fancy. I'm really just exploring my options at the moment - seeing what the easiest method would be. --195.137.100.182 18:26, 2 August 2007 (UTC)
 * Sure - take a look at <tt>maintenance/importTextFile.php</tt> in your wiki installation. It's got all the code to use the Article class' doEdit method.  That could easily be modifed to pull from your DB.
 * Aha! That looks like just what I'm looking for. Thanks a lot! --195.137.100.182 18:46, 2 August 2007 (UTC)

Embed special page results
From meta:Help talk:Embed page, is there a way to embed results from special pages like Special:Whatlinkshere/? I'd rather not have to dork with DPL or another extension to do this if I don't have to... -Eep² 10:40, 3 August 2007 (UTC)