Manual:Installing MediaWiki on Windows Server 2008

Warning, this page is not complete or fully tested.

The link below should be useful in helping get IIS 7.0 and PHP working on a server.

http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis-70/

You will need to use the tutorial on installing MediaWiki onto Windows 2003 for the rest of the installation process.

A guide
A quick and dirty overview for Server 2008 & local MySql. 2008 R2 is not tested and may differ.

fastcgi.impersonate = 1 cgi.fix_pathinfo = 1 cgi.force_redirect = 0 open_basedir = "c:\inetpub\wwwroot;c:\PHP\uploadtemp;C:\PHP\sessiondata" extension = php_mysql.dll extension_dir = "./ext" upload_tmp_dir = C:\PHP\uploadtemp session.save_path = C:\php\sessiondata
 * PHP
 * 1) Grab a Zip archive of PHP and unzip it into C:\PHP.
 * 2) Create two subdirs: c:\PHP\sessiondata and c:\PHP\uploadtemp.
 * 3) Grant modify rights to the IUSR account for the subdirs.
 * 4) Copy php.ini-recommended as php.ini
 * 5) Edit php.ini and make the following changes. Most of the keys should be in the config file, but are commented.
 * IIS
 * 1) Install Web server role. Make sure to select CGI and HTTP Redirection options.
 * 2) Install IIS Admin pack: http://www.iis.net/expand/AdministrationPack
 * 3) Launch IIS Manager and select the server.
 * 4) Open Handler Mappings
 * 5) Select Add Module Mapping. Enter the following values: Path = *.php, Module = FastCgiModule, Executable = c:\php\php-cgi.exe, Name = PHP via FastCGI.
 * 6) Answer Yes to the question about creating a FastCGI application for the executable.
 * 7) Create a test page into wwwroot directory: phpinfo.php and set the contents like this: &lt;?php phpinfo; ?&gt;
 * 8) Fire up a browser, preferably on remote machine and load the phpinfo.php.
 * 9) Return to IIS Manager and select the server.
 * 10) Open FastCGI Settings.
 * 11) Edit php-cgi.exe settings.
 * 12) Set an environment variable PHP_FCGI_MAX_REQUESTS and assign a value of 10000.
 * 13) Set InstanceMaxRequests value to 10000 too.
 * 14) Set index.php as a default document.


 * MySQL
 * 1) Install MySql and pick the Typical settings.
 * 2) Configure MySql
 * 3) Select Detailed
 * 4) Select Developer machine
 * 5) Select Multifunction database
 * 6) Select path for DB files
 * 7) Select DSS/OLAP
 * 8) Enable TCP. If remote server, add firewall exception
 * 9) Select standard charset
 * 10) Select service install and put binaries into path
 * 11) Assign root password
 * 12) Exit the command prompt and launch a new one to get MySql binaries into the path.
 * 13) Edit \Program Files\MySQL\MySQL Server 5.1\my.ini (or whatever is the MySql cfg path Look for header [mysqld] and add directive old-passwords
 * 14) Restart MySql: net stop mysql && net start mysql
 * 15) Query the database: mysqlshow -u root -p (password will be prompted). This is to check that MySql is up and running.
 * 16) Logon to the database and change password hashing: mysql -u root -p (passwd'll prompted) UPDATE mysql.user SET Password = OLD_PASSWORD('new_password'); WHERE Host = 'localhost' AND User = 'root'; FLUSH PRIVILEGES;


 * MediaWiki
 * 1) Extract MediaWiki into inetpub\wwwroot\Mediawiki dir
 * 2) Grant the IUSR account modify rights to Mediawiki directory's subdirs config and images
 * 3) NB! the config dir right MUST be revoked later on.
 * 4) Launch a browser and click the Configure link.
 * 5) Configure the Wiki, see other guides about this part
 * 6) Move config\LocalSettings.php file into Mediawiki dir.
 * 7) Revoke IUSR rights to the config dir
 * 8) If file uploads are needed, edit the LocalSettings.php like, say, this:

$wgEnableUploads = true; $wgFileExtensions = array('png', 'gif', 'jpg', 'jpeg', 'doc', 'xls', 'mpp', 'pdf', 'ppt', 'tiff', 'bmp', 'docx', 'xlsx', 'pptx', 'ps');

Known issues

 * File uploads with international characters like å, ä, ö, è, ñ etc won't work. PHP/IIS combination wrecks UTF-8 and the file names will contain garbage sequences.
 * Work-around: strip any accents: ä->a, å->a, è->e and so on when uploading files.