Manual talk:Running MediaWiki on Windows

Texvc for Windows
Anyone care to make a Windows texvc executable available for those of us who can't get it together to build their own?

By the way, texvc produces slashes (/) in filenames, which results in errors on windows. Cannot get any formula rendered.

Nothing happens
When i've run the config/index.php (successfully) i'm told to move the LocalSettings.php to the parent directory (the one where index.php is, as i've understood it). When i've done that, the index.php should work. But when I click on the link to index.php, I only get a page telling me that the index.php could not be shown (the usual error 404 message). When I look at the php-files (index.php and LocalSettings.php) there seems to be something strange with the includes. For example, in index.php (in the parent directory) there are lots of include_once like: include_once( "Setup.php" ); Setup.php is located in the includes folder and should be included with: include_once( "//includes/Setup.php" ); This maybe isn't the problem, I'm just a PHP amateur, but has someone else encountered this problem and knows how to resolve it? (I have mediawiki-1.2.6 running on Apache, PHP and MySql)

Can't edit
I've installed Apache, MySQL, PHP and MediaWiki on my PC and it all nearly seems to be working. When I browse to wiki.phtml I get the main page with the menus but I can't edit it or go to any of the special pages, I always get taken back to the main page (which is empty). Anyone got any ideas? Mintguy 07:06, 22 Nov 2003 (UTC)


 * The reason it wasn't working was because I hadn't modified the php.ini file with register_globals = On. Mintguy


 * Also look for multiple copies of php.ini in your harddisk. Mine didn't start until I found that the right php.ini where to enable register_globals was the one inside c:\windows, NOT the one in the default php directory. At18 22:23, 8 Dec 2003 (UTC)

Getting sysop rights?
Hi

@first: sorry for my bad language ;)

I've installed MediaWiki on an WAMP-PC ... I wanted to log in as Sysop - but i don't have a password for this User (Do not find this also anywhere) ... Then i've register a new user - this works fine - but no Admin-Rights ;)

Where can i find the Sys-OP-Default-PW?

Thx Patrick


 * See Setting user rights in MediaWiki. --Brion VIBBER 01:11, 6 Dec 2003 (UTC)

Wrong DB?
The instructions on this page say one should enter "use wikipedia" before sourcing the dump. Shouldn't that read "use wikidb" instead? -- Finlay McWalter 23:00, 19 Jan 2004 (UTC)

Download Help
I cant seem to find the Win32 download for Mediawiki. It seems only the Linux version exists at http://sourceforge.net/projects/wikipedia/


 * There is no such thing as a Linux version or Win32 version of MediaWiki. It's written in cross-platform PHP and ought to run unchanged on Linux, Unix, MacOS X, Windows, and any other platform that Apache+PHP run on. --Brion VIBBER 06:33, 28 Feb 2004 (UTC)

Install Help
When I try to use "c:\php\php c:\mediawiki\install.php" to instill mediawiki, there are lots of Warning and Notice appears. Here are all the Warnings and Notices:
 * PHP Notice: Undefined variable:  REQUEST_METHOD in C:\myweb\wiki\Setup.php on line 74
 * PHP Notice: Undefined variable:  REQUEST_URI in C:\myweb\wiki\Setup.php on line 74
 * PHP Warning: mysql_select_db: supplied argument is not a valid MySQL-Link resource in C:\myweb\wiki\Database.php on line 387
 * PHP Warning: mysql_query: supplied argument is not a valid MySQL-Link resource in C:\myweb\wiki\Database.php on line 165
 * PHP Notice: Undefined variable:  sysop_password in c:\mediawiki\install.php on line 199
 * PHP Warning: mysql_num_rows: supplied argument is not a valid MySQL result re source in C:\myweb\wiki\Database.php on line 190
 * PHP Warning: mysql_free_result: supplied argument is not a valid MySQL result  resource in C:\myweb\wiki\Database.php on line 188
 * PHP Warning: mysql_num_rows: supplied argument is not a valid MySQL result resource in C:\myweb\wiki\Database.php on line 190
 * PHP Notice: Undefined variable:  developer_password in c:\mediawiki\install.php on line 222
 * PHP Notice: Undefined variable:  sysop_password in c:\mediawiki\install.php on line 199
 * PHP Notice: Undefined index:  unprotectedarticle in C:\myweb\wiki\LanguageZh.php on line 1063
 * PHP Notice: Undefined index:  uploaddisabled in C:\myweb\wiki\LanguageZh.php on line 1063
 * PHP Notice: Undefined index:  userstatstext in C:\myweb\wiki\LanguageZh.php on line 1063
 * PHP Notice: Undefined index:  viewsource in C:\myweb\wiki\LanguageZh.php on line 1063
 * PHP Notice: Undefined index:  wlsaved in C:\myweb\wiki\LanguageZh.php on line 1063
 * PHP Notice: Undefined index:  wlshowlast in C:\myweb\wiki\LanguageZh.php on line 1063
 * PHP Notice: Undefined index:  wrong_wfQuery_params in C:\myweb\wiki\LanguageZh.php on line 1063
 * PHP Notice: Undefined property:  mContainsNewMagic in C:\myweb\wiki\Parser.php on line 894

What should I do to correct this? And in my LocalSettings.php:
 * $wgSitename        = "abc";
 * $wgServer          = "http://abc.3322.org";
 * $wgScriptPath	   = "/wiki";
 * $wgScript          = "{$wgScriptPath}/index.php";
 * $wgRedirectScript  = "{$wgScriptPath}/redirect.php";
 * $wgArticlePath     = "{$wgScript}/$1";
 * $wgStyleSheetPath  = "{$wgScriptPath}/style";
 * $wgStyleSheetDirectory = "{$IP}\\style";
 * $wgUploadPath      = "{$wgScriptPath}/upload";
 * $wgUploadDirectory	= "{$IP}\\upload";
 * $wgLogo				= "{$wgUploadPath}/wiki.png";
 * $wgTmpDirectory    = "{$IP}\\tmp";

When I try to access Http://abc.3322.org/wiki/index.php, the first page is OK, but when I try to Edit this page, lots of errors appear.


 * Your PHP error reporting setting is too high; MediaWiki 1.1 and 1.2 arent' designed to run with E_NOTIFY. Turn that off. --Brion VIBBER 19:33, 16 Mar 2004 (UTC)
 * I set "E_ALL & ~( E_NOTICE | E_WARNING )" in php.ini, and restart apache, there are still warnings when editing a page, why?


 * I tried using In-place web install of mediawiki-1.2.0rc4.tar.gz, the result is just the same: first page is OK ,but when i try to Edit, lots of errors:


 * Warning: session_start: open(/tmp\sess_8a26c9ebf7916ba31859bb7056e26b2a, O_RDWR) failed: No such file or directory (2) in C:\myweb\mediawiki\includes\User.php on line 146
 * Warning: session_start: Cannot send session cookie - headers already sent by (output started at C:\myweb\mediawiki\includes\User.php:146) in C:\myweb\mediawiki\includes\User.php on line 146
 * Warning: session_start: Cannot send session cache limiter - headers already sent (output started at C:\myweb\mediawiki\includes\User.php:146) in C:\myweb\mediawiki\includes\User.php on line 146
 * Warning: Cannot modify header information - headers already sent by (output started at C:\myweb\mediawiki\includes\User.php:146) in C:\myweb\mediawiki\includes\OutputPage.php on line 176
 * Warning: Cannot modify header information - headers already sent by (output started at C:\myweb\mediawiki\includes\User.php:146) in C:\myweb\mediawiki\includes\OutputPage.php on line 210
 * Warning: Cannot modify header information - headers already sent by (output started at C:\myweb\mediawiki\includes\User.php:146) in C:\myweb\mediawiki\includes\OutputPage.php on line 211
 * Warning: Cannot modify header information - headers already sent by (output started at C:\myweb\mediawiki\includes\User.php:146) in C:\myweb\mediawiki\includes\OutputPage.php on line 212
 * Warning: Cannot modify header information - headers already sent by (output started at C:\myweb\mediawiki\includes\User.php:146) in C:\myweb\mediawiki\includes\OutputPage.php on line 213
 * Warning: Cannot modify header information - headers already sent by (output started at C:\myweb\mediawiki\includes\User.php:146) in C:\myweb\mediawiki\includes\OutputPage.php on line 253
 * Warning: Cannot modify header information - headers already sent by (output started at C:\myweb\mediawiki\includes\User.php:146) in C:\myweb\mediawiki\includes\OutputPage.php on line 254


 * what can I do? Help!!


 * Your PHP is misconfigured; change session.save_path to a path that exists, like c:\windows\temp (?) --Brion VIBBER 22:35, 16 Mar 2004 (UTC)


 * yes, that's right! Thanks

Blank Pages on Initial Install
I can't get anything but a blank page to pull up. Windows 2K3 config. Checking everything so far I can't figure out why I get blank output.
 * FYI I have tried turning debug mode on in PHP and still no results...
 * I have the same thing: linux(debian)...only a blank page, it's driving me batty, and soon to another wiki :(
 * Ditto here with LAMP installed and functioning otherwise correctly on Fedora Core 2.
 * Same here / LAMP (PHP 4.3.8) and blank pages for everything but the start page
 * To prevent blank pages on install, write this: 'while (@ob_end_flush);' in config/index.php after 'header(...' (line 21 in mediawiki 1.3.9) --Strang 14:56, 18 Dec 2004 (UTC)

MySQL Errors when installing MediaWiki
Hi,

I'm having some problemsn when installing MediaWiki on Windows. It seems that the creation of the wikidb does not work. I get the following errors :

MySQL root password (typing will be visible): xxxxxx Creating database... PHP Warning: mysql_query: supplied argument is not a valid MySQL-Link resource in d:\progra~1\apache~1\apache2\htdocs\wiki\Database.php on line 165 PHP Warning: mysql_query: supplied argument is not a valid MySQL-Link resource in d:\progra~1\apache~1\apache2\htdocs\wiki\Database.php on line 165

After that the following errors are displayed after answering the 2 questions...

PHP Warning: mysql_query: supplied argument is not a valid MySQL-Link resource in d:\progra~1\apache~1\apache2\htdocs\wiki\Database.php on line 165 ... I installed the stable MySQL database version 4.0.18 on apache 2.0.47 with php 4.3.2 Any ideas ??? thanks in advance


 * You have no connection to your DB. This can have many causes. One of them can be in new authentication algorithm in MySQL 4. Read link this to solve that problem. Another can be in invalid login/password or MySQL daemon config. --Strang 15:08, 18 Dec 2004 (UTC)

No Database connect, error message lacking
I have gotten MediaWiki to install on Windows 98, I am running the Uniserver 1.3 which provides Apache, PHP and MySql.

The MediaWiki installer did create the databases and tables as PHPAdmin shows them present, but when I go to the default page and it (implicitly) runs index.php, all I get is the cryptic error message


 * Sorry! The wiki is experiencing some technical difficulties, and cannot contact the database server.

I'm not sure exactly what is wrong, is there a way to get more information so it can tell me why it can't connect?

Strage brackets after instlation
Hi to all

I instaled Wiki pedia in W2K3 everything works. Except TEX and some strange bug on the pages

TEX problem: I instaled all the software mentioned in the guide (Ming, OCalm, Miktex, ImageMagic), edited that file. but when I try to make such error pops up: ocamlopt -c util.ml 'as' is not recognized as an internal or external command, operable program or batch file. Assembler error, input left in file C:\DOCUME~1\edvardas\LOCALS~1\Temp\camlasm78 7bc9.s mingw32-make.exe: *** [util.cmx] Error 2 maybe someone has already compiled version of the math file for windows???
 * response : compiling with optimized caml requires you to have Microsoft assembler 6.11 or later and Visual studio C++ 6.0 installed, this is why you have an assembly error, you have three solutions:
 * install Visual c++ and MASM and compile
 * use the non optimized (interpreted bytecode) version instead, by typing mingw32-make texvc.bc, texvc.bc is an executable, so rename it to texvc.exe, and continue as if this were the normal version. The performance hit should not be too high, as it is latex and convert that takes most of the processing time
 * contact me at feza DOT gy AT laposte DOT net, and ask me for either version 82.66.120.34 21:42, 16 Jul 2004 (UTC)

MArkup bug or something: on every page I see something similar to this: Featured article

Selected anniversaries I dont see a list of topics i can find a topic only using search function. How to fix it???

Thank you in advance Edvardas Rimkus rimkus@ik.ku.lt

Using EasyPHP
Anyone done a Windows install using EasyPHP instead of separately installing MySQL, PHP, and Apache? This is described in the TikiWiki documentation at:

http://doc.tikiwiki.org/tiki-index.php?page_ref_id=10

Some source which might help
I couldn't get Tex runnig at all, so I just hacked around in the math directory in the render.ml-file.

I found out texvc couldn't find/create the necessary files, due to the unix/win differences in pathes: a unix-path looks like /user/home/blabla, while a windows path looks like c:\windows\sucks. There seemed to be some parts where there are slashes instead of backslashes in the "quick and dirty" hack on this page. After some trials I got to the following:

let cmd_dvips tmpprefix = "dvips -R -E -q \"" ^ tmpprefix ^ ".dvi\" -f >\"" ^tmpprefix^".ps\" " let cmd_latex tmpprefix = "latex -quiet \"" ^ tmpprefix ^ ".tex\" " let cmd_convert tmpprefix finalpath = "convert -quality 100 -density 120 \"ps:"^tmpprefix^".ps\" \"" ^ finalpath ^ "\" "

exception ExternalCommandFailure of string

let render tmppath finalpath outtex md5 = let tmpprefix0 = (string_of_int (Unix.getpid ))^"_"^md5 in   let tmpprefix = (tmppath^"\\"^tmpprefix0) in    let unlink_all  = begin Sys.remove (tmpprefix ^ ".dvi"); Sys.remove (tmpprefix ^ ".aux"); Sys.remove (tmpprefix ^ ".log"); Sys.remove (tmpprefix ^ ".tex"); Sys.remove (tmpprefix ^ ".ps"); Sys.remove (tmpprefix ^ ".tmp"); end in   let f = (Util.open_out_unless_exists (tmpprefix ^ ".tex")) in      begin output_string f (Texutil.get_preface ); output_string f outtex; output_string f (Texutil.get_footer ); close_out f;	if Util.run_in_other_directory tmppath (cmd_latex tmpprefix0) != 0 then (unlink_all ; raise (ExternalCommandFailure "latex")) else if (Sys.command (cmd_dvips tmpprefix) != 0) then (unlink_all ; raise (ExternalCommandFailure "dvips")) else if (Sys.command (cmd_convert tmpprefix (finalpath^"\\"^md5^".png")) != 0) then (unlink_all ; raise (ExternalCommandFailure "convert")) else unlink_all end

In addition to replacing the two left "/" with "\\" I deleted the output pipe for the latex-call, which seemed to produce problems.

Please note, that I made this by trial and error. It seems to work, but maybe it will won't in the future or with your computer.

Have fun wikiing!

Norman Hilbert

Hi Norman,

I think this is a very good addon to the hack in the main page. The forward slashes in paths do work on win2k, but I hadn't thought about other windows versions. Would you mind merging your changes in the code in the main page ?

82.66.120.34 23:54, 2 Oct 2004 (UTC)

How to view images
I am new to Wikipedia. I have installed it locally (usign EasyPHP) and the basic stuff is working. I have downloaded the en-commons images and un-bundled the tgz files in the images directory. I am not abel to see the images. How do I enable the image display?

Thanks, Deepak

Nothing happens II
After having clicked the "Install"-Button at the bottom of config.php, I get a blank site. When I reload the blank page, I get the following message (I only post the last line:) There are already MediaWiki tables in this database. Checking if updates are needed... At the bottom of the page an additional error message is given out: Updating ipblocks table... Query "ALTER TABLE ipblocks ADD ipb_auto tinyint(1) NOT NULL default '0', ADD ipb_id int(8) NOT NULL auto_increment, ADD PRIMARY KEY (ipb_id)" failed with error code "Table 'mediwiki7.ipblocks' doesn't exist". Thanks in advance for every reply!

Nothing happens III
I'm trying to install mediawiki-1.3.9 xampp 1.4.10a for Windows (XP SP 2) and have exactly the same problem. The wikidb was created but there's no ipblocks table. Can anyone help with this?

Hi, I'm also having the same problem I installed EasyPHP in Windows (XP SP 2). I got an error message in index.php as ALTER TABLE ipblocks ADD ipb_auto tinyint(1) NOT NULL default '0', ADD ipb_id int(8) NOT NULL auto_increment, ADD PRIMARY KEY (ipb_id)" failed with error code "Table 'mediwiki7.ipblocks' doesn't exist". So I created the ipblocks table manually in mysql.

Then when I tried it gave the other error message as Adding ipb_expiry field to table ipblocks...Query "UPDATE ipblocks SET ipb_expiry = date_format(date_add(ipb_timestamp,INTERVAL 1 DAY),"%Y%m%d%H%i%s") WHERE ipb_user = 0" failed with error code "".

I checked the Schema of wikidb but in the ipblocks there is no field like ipbexpiry

Please help me out. Karthik.G

Error on Wiki after configuring Texvc
I have installed Xampp 1.4.7. Now after I have configured texvc as described in the Page Running Mediawiki on Windows, I'm getting this error:

Warning: Invalid argument supplied for foreach in C:\apachefriends\xampp\htdocs\thermowiki\includes\User.php on line 90

Warning: Invalid argument supplied for foreach in C:\apachefriends\xampp\htdocs\thermowiki\includes\User.php on line 90

Warning: Invalid argument supplied for foreach in C:\apachefriends\xampp\htdocs\thermowiki\includes\User.php on line 90

Warning: array_key_exists [function.array-key-exists]: The second argument should be either an array or an object in C:\apachefriends\xampp\htdocs\thermowiki\includes\MagicWord.php on line 89 A database query syntax error has occurred. This could be because of an illegal search query (see $5), or it may indicate a bug in the software. The last attempted database query was: SELECT ss_total_views, ss_total_edits, ss_good_articles FROM site_stats WHERE ss_row_id=1 from within function "wfLoadSiteStats". MySQL returned error "1046: No Database Selected".

Now when I try to execute this query, it runs perfectly fine on MySQL prompt.

After this I tried to Stop and Start Xampp, then it gives a cannot find server error.

Then I replaced the Localsettings.php file, with the original generated file, I was able to open the Wiki page.

But again when I made the changes in LocalSettings.php file, as suggestes in the article, it again gave me the Server not found error.

Please suggest, what could be the problem. My mail ID is averma@webasto.de


 * The same problem (and message) occured on Debian Woody, when texvc was installed, and tetex (TeX distribution) was not.


 * The solution: remove $wgServer from LocalSettings

Error in parsing Math Expression
Hi I have configured texvc as described by you in Running Media Wikki on Windows. I installed MikTex as Large Installation. Then I restarted the Wiki Server but when I give a math expression and try to see a preview, then I get this error:

Failed to parse (PNG conversion failed; check for correct installation of latex, dvips, gs, and convert): I(\nu) d\nu d\Omega=\frac{2h\nu^{3}}{c^2}\frac{1}{\exp\left(\frac{h\nu}{kT}\right)-1}d\nu d\Omega

Please suggest what am I missing?

Hi, I have the same problem and i have no idea on how to solve it. Did you found a solution or are there someone who can help us?

thank you...

Error when editing LocalSettings.php
Hi,

I have installed mediawiki and it works fine. However, when I try to change the title of my site or set different access options by editing the LocalSettings.php I get error messages after saving everything and running my wiki...

Warning: Cannot modify header information - headers already sent by (output started at /var/www/web18/html/mediawiki/LocalSettings.php:1) in /var/www/web18/html/mediawiki/includes/OutputPage.php on line 351

Warning: Cannot modify header information - headers already sent by (output started at /var/www/web18/html/mediawiki/LocalSettings.php:1) in /var/www/web18/html/mediawiki/includes/OutputPage.php on line 352

Warning: Cannot modify header information - headers already sent by (output started at /var/www/web18/html/mediawiki/LocalSettings.php:1) in /var/www/web18/html/mediawiki/includes/OutputPage.php on line 262

Warning: Cannot modify header information - headers already sent by (output started at /var/www/web18/html/mediawiki/LocalSettings.php:1) in /var/www/web18/html/mediawiki/includes/OutputPage.php on line 290

Warning: Cannot modify header information - headers already sent by (output started at /var/www/web18/html/mediawiki/LocalSettings.php:1) in /var/www/web18/html/mediawiki/includes/OutputPage.php on line 291

Warning: Cannot modify header information - headers already sent by (output started at /var/www/web18/html/mediawiki/LocalSettings.php:1) in /var/www/web18/html/mediawiki/includes/OutputPage.php on line 293

Can you explain what I did wrong?

Regards Christian

Error in database
I have installed the ApacheFriends XAMPP (basic package) version 1.4.11 and mediawiki-1.3.9 on a local computer. Everything seems to work fine except when I try to run "Special:Randompage", "Special:Lonelypages", "Special:Uncategorizedpages" and "Special:Deadendpages". All I get is this error message: Warning: mysql_query: Unable to save result set in C:\Programme\apachefriends\xampp\htdocs\dewiki\includes\Database.php on line 182

and in the main article area (text is originally written there in german but I've translated it for you): Error in database There was an error in the syntax of the database query. It may be an illegal query or an error in the software. Last database query was: SELECT cur_id,cur_title FROM cur USE INDEX (cur_random) WHERE cur_namespace=0 AND cur_is_redirect=0 AND cur_random>0.307567902053 ORDER BY cur_random LIMIT 1 of the function "wfSpecialRandompage". MySQL generates error "1030: Got error 124 from storage engine".

Any ideas what the problem is? Thanks, Sandra