This guide is out of date; consider installing MindTouch on IIS or writing an updated guide for Apache instead.

Notes on installing Deki Wiki Hayes/Lyons on Windows (including Vista and Server 2008).

(This has been tested on Windows 7 and Server 2008R2 as well.  All is ok, except for a minor MySQL installer issue which installs, however fails to set the root password.  You can do this by hand and it works great!)  Update:  This no longer fails; The MySQL Installer has been corrected. -Drew

Prerequisites

  • Apache 2.2
  • MySQL 5.X- NOTE: Deki Wiki Hayes uses stored procedures and is therefore incompatible with MySQL 4.x
  • PHP 5.2.X - NOTE: Deki Wiki Hayes uses the PHP5 object model and is therefore incompatible with PHP4  (NOTE:  PHP 5.3 is NOT compatible at this time!)
  • Microsoft .NET 2.0 (Mono 1.2+ if Windows 2000)  (On Windows 2008, Windows 2008R2, Windows Vista and Windows 7, download and install the .NET 3.5 packages.)
  • ImageMagick 6.5.4 (or latest v

MySQL Installation

Download the MySQL Installer (Either 32 bit or 64 bit, depending on your system config.)

Edit your my.ini file:  C:\Program Files\MySQL\MySQL Server 5.x\my.ini

Make sure you DO NOT have NO_AUTO_CREATE_USER and STRICT_TRANS_TABLES in your sql-mode setting

# Set the SQL mode to strict
#sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
sql-mode="NO_ENGINE_SUBSTITUTION"

Restart MySQL:
Goto Start > Run > Services.msc > Right Click on MySQL service and select "RESTART" or "STOP" then "START"

Apache Installation

Download the Apache 2.2 Win32 installer  (As of this writing, there is no 64-bit Windows installer for Apache.)

Note: If you are using NOD32 you should add Apache to the IMON exclusion list. Thank Raul for noticing this.

PHP Installation

Download PHP 5.2.9 for Win32 (installer) or you may want to install the PHP 5.2.9 for Win32 (ZIP) version instead because some users have trouble with the Win32 installer.  (Chances are that you will not have an issue and you should use the installer version.)

Make sure to choose "Apache 2.2.x Module" in the installer

On the "Choose Items to Install" screen, make sure the following extensions are enabled

  • Curl
  • GD2
  • MySQL
  • MySQLi
  • Mime_Magic (be sure to set the mime_magic.magicfile path. usually php/extras/magic.mime)
  • mbstring

 

Win32 ZIP  (If you choose the installer version of PHP, please skip this area.)

Add PHP to the path before MySQL.  For example, you could add the following characters to the very beginning of the path environment variable: "C:\php-5.2.9;" (don't forget the semicolon)

Add a PHPRC environment variable and set it to your PHP path, e.g. C:\php-5.2.9

Copy php.ini-recommended to php.ini

Edit php.ini and uncomment the following by removing the initial semicolon:  

  • extension=php_curl.dll
  • extension=php_gd2.dll
  • extension=php_mbstring.dll
  • extension=php_mime_magic.dll
  • extension=php_mysql.dll
  • extension=php_mysqli.dll

All PHP installations

Edit C:\Program Files\PHP\php.ini

set the following values:

short_open_tag = On

Uncomment ;extension=php_mbstring.dll

ImageMagick

Download ImageMagick for Win32.  You probably want to choose one of the versions that includes 16 in the name instead of 8, because this will allow you to use 16 bit images instead of 8 bit images, which allows for images with more colors.  The "static" version worked for me, but it's possible the DLL version works also.  (There is also a 64-bit version if you are running on 64-bit hardware with a complimentary OS.)

Run the installer and choose the defaults.

        

.NET 2.0 Runtime

Make sure you have the Microsoft .NET 2.0 framework installed.  You can check by going to Windows Update and verifying ".NET Framework 2.0" does not appear under the "Software, Optional" section.

      

Download Deki Wiki

Download the latest Deki Wiki Source Release

Extract the archive to:  c:\deki

 

Apache Configuration

(Most of the info below will already be done for you if you used the installers.)

Edit your httpd.conf file:  C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf

Enable PHP5.  Be sure to add this in the LoadModule section rather than trying to put the command at the end of the configuration.

LoadModule php5_module "c:/Program Files/PHP/php5apache2_2.dll" 

Enable the following additional modules:

LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so 

Create a VirtualHost like the one below.  Make sure you edit the paths so that they are appropriate to your environment.  You will also need to make sure that the log directories that you specified are already created.  If you need to use a port other than 80, add a colon and port number after the star, so for example to use port 8080 change the first line to <VirtualHost *:8080>.

<VirtualHost *>

    DocumentRoot "c:/deki/web"
    ServerName dekiwiki

    ErrorLog "c:/deki/logs/apache/error-dekiwiki.log" 
    CustomLog "c:/deki/logs/apache/access-dekiwiki.log" common

    DocumentRoot "C:/deki/web"

    RewriteEngine On
    RewriteCond %{REQUEST_URI} ^/$
    RewriteRule ^/$ /index.php?title= [L,NE]

    RewriteCond %{REQUEST_URI} ^/@gui/[^.]+$
    RewriteRule ^/@gui/(.*)$ /proxy.php?path=$1 [L,QSA,NE] 

    RewriteCond %{REQUEST_URI} !^/(@api|editor|skins|config|@gui)/
    RewriteCond %{REQUEST_URI} !^/index\.php
    RewriteCond %{REQUEST_URI} !^/favicon\.ico$
    RewriteCond %{REQUEST_URI} !^/robots\.txt$
    RewriteCond %{QUERY_STRING} ^$ [OR] %{REQUEST_URI} ^/Special:Search
    RewriteRule ^/(.*)$ /index.php?title=$1 [L,QSA,NE]

    # deki-api uses encoded slashes in query parameters so AllowEncodedSlashes must be On
    AllowEncodedSlashes On   

    # mod_proxy rules
    ProxyPass /@api http://localhost:8081 retry=1
    ProxyPassReverse /@api http://localhost:8081
    SetEnv force-proxy-request-1.0 1
    SetEnv proxy-nokeepalive 1

    AllowEncodedSlashes On
</VirtualHost>

If you running Windows XP please take note of the following: Inside httpd.conf please make sure you have the following line in red:

<Directory    />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from all #    Satisfy all
</Directory>

I spent about an hour trying to figure out why I kept getting 403 Forbidden errors.  From messing with .htaccess files to uncommenting everything in the httpd.conf - Mike

Restart apache2 to load the new configuration. 

Installation

Before open http://deki add in file c:\WINDOWS\system32\drivers\etc\hosts following line: 127.0.0.1 deki

To install Deki Wiki, launch a web browser and access the Web Installer by and go to the URL of your Deki.  Example:  http://deki-hayes/

If you get an error saying the following:
Error: Could not find a suitable database driver!
For MySQL, compile PHP using --with-mysql, or install the mysql.so module

-Copy C:\Program Files\MySQL\MySQL Server 5.1\bin\libmysql.dll  to c:\windows\system32
-Restart Apache2 - Mike

If you were one of those who preferred to manually edit the Apache configuration file (httpd.conf), be sure to properly configure PHP like this:

PHPIniDir "Path to you PHP directory"
LoadModule php5_module "php5apache2_2.dll"
AddType application/x-httpd-php .php

-Jorge

If you get an error saying the following:
FATAL: curl is not enabled. curl is required to connect to deki-api. Aboring... 
-Copy C:\Program Files\PHP\ssleay32.dll to c:\windows\system32
-Copy C:\Program Files\PHP\libeay32.dll to c:\windows\system32
-Restart Apache2 - Mike

Else Continue:
1) Fill in the required information

2) In the "Advanced Configuration" specify the location of the ImageMagick convert.exe and identify.exe binaries

ImageMagick convert:  C:\Program Files\ImageMagick-6.5.4-Q16\convert.exe 

ImageMagick identify:  C:\Program Files\ImageMagick-6.5.4-Q16\identify.exe 

./ImageMagickConfig.png

Click "Install Deki Wiki"

You should see a confirmation screen like this:

./InstallComplete.png

Open up a command prompt: Start >> Run >> cmd.exe
Important: Under Windows Vista you must run cmd.exe with Administrator privileges.  Do this by opening Windows Explorer, navigate to the 'C:\Windows\System32' folder, right-click on 'cmd.exe' and select 'Run as administrator'.

Run the additional commands as specified by the installer.

Important: after you execute the last command, mindtouch.host.bat,  leave the cmd window open so the batch file (and the exe file it calls) can keep running. If you close that window, various servers Deki requires aren't running, and you can't use the wiki.

Then click the link to access your wiki!

If you get the following error:

http://img261.imageshack.us/img261/4760/errorfe6.png

Its because of the .NET framework. mono-1.2.4-gtksharp-2.8.3-win32-3.exe didn't work for me and I eventually had to uninstall mono and install the framework :) -Mike

(Mono 1.2+ if Windows 2000)  (On Windows 2008, Windows 2008R2, Windows Vista and Windows 7, download and install the .NET 3.5 packages.) -Drew


Creating filters for Lucene

(For release 1.9a or later, you should refer to this page http://wiki.opengarden.org/Deki_Wiki/FAQ/File_Management/How_do_I...Index_file_attachments%3f for a much easier approach. Also see this forum thread for problems/solutions in making this critical feature work on a W2K3 machine: http://forums.opengarden.org/showthread.php?p=12470#post12470) -bohappa, Mar 27, 2008)

The default filters shipped with DekiWiki in \web\bin\filters do not work on Windows.
They have to be replaced with .bat files that convert documents coming in via stdin to text as stdout.
A few sample converters are available in the filters.zip attached file. (Credits to woogie who posted initial batch files in the following post : http://forums.opengarden.org/showthread.php?t=758)
The sample relies on xpdf's pdftotext.exe utility to convert pdf to text, on jxl.jar for Excel files, and (unfortunately) on MS Word and Powerpoint for doc and ppt files.
Once a new converter has been created, the filter path has to be specified in mindtouch.deki.startup.xml. Beware that the filter path needs to have only backslashes in it in order to be recognized on Windows.

Tag page

Files 6

FileSizeDateAttached by 
 error.PNG
No description
20.36 kB08:58, 28 Aug 2007Mike_SmithActions
filters.zip
Sample converters for Lucene indexing on Windows
1064.75 kB20:54, 4 Dec 2007lch77Actions
 httpd.conf
sample httpd.conf
19.37 kB20:15, 25 Jul 2007peteeActions
 ImageMagickConfig.png
ImageMagick configuration
22.99 kB23:17, 23 Jul 2007peteeActions
 InstallComplete.png
Successful installation
72.02 kB23:22, 23 Jul 2007peteeActions
 php_mbstring.dll
No description
1828.06 kB08:59, 28 Aug 2007Mike_SmithActions
Viewing 15 of 24 comments: view all
Nice installation instructions for Windows, but has anyone been able to add the required components to "Print pages as PDF" ?

I can't seem to install "html2ps" and "ps2pdf" in a usable form for deki-wiki
Posted 19:57, 1 Oct 2007
I am also having issues with the PDF printing. I've posted a forum query here: http://forums.opengarden.org/showthread.php?t=501 edited 18:17, 10 Oct 2007
Posted 18:16, 10 Oct 2007
Ichi: this happens when you close the cmd window after running the mindtouch.host.bat file. I know, the instinct of a Windows user is to close cmd windows after batch files run, but in this case, the file needs to keep running. You might need to make the batch file something that runs every time windows starts up to make your life easy afterwards.
Posted 04:28, 16 Oct 2007
As to pdf printing, a work around that I actually prefer in the Windows environment because of its applicability to all Windows applications is to install PDFCreator or doPDF (albeit this is a client side solution). These both create a PDF virtual printer for all Windows applications. Using this approach for printing a Deki Wiki page in Firefox creates a pinted page that only includes the actual page content without the Deki Wiki heading or the navigation pane. The only shortfall I see is that it doesn't print out the comments should you want those. But that seems to be a function of how Deki Wiki defines the printable area? Even a Firefox page print preview does not include comments. edited 02:57, 1 Nov 2007
Posted 02:26, 25 Oct 2007
For PHP install (5.2.3 and 5.2.4):
I found the mbstring extension listed as "Multi-Byte String". Also, mime_magic was listed as "mimetypec". With those extensions selected, I had no issues with an automated install.

I didn't find any path info for mime_magic, but install was clean and ran fine without that change. Anybody have a more detailed set of instructions for the mime_magic path?
Posted 08:54, 25 Oct 2007
In the httpd.conf of Apache server i had to insert:

LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php

# configure the path to php.ini
PHPIniDir "C:/installpath/php"

Otherwise php was not interpreting the target and showed only the text of the php file. After this I at least have the directory listing and .php files are interpreted
Posted 14:05, 25 Oct 2007
Can someone take the pertinent installation information from the comments and integrate it with the instructions above? I'd do it but I don't think I'm qualified :D
Posted 20:18, 8 Nov 2007
HI, I have just few expirience with and apache+php+mysql.
I tried to setup Dekiwiki by this howto. The how to is great but, I have a Problem my Dekiwiki cals "Your wiki is downArgh, sorry! We're experiencing some technical problems right now. An administrator has been notified and will restore your wiki as soon as possible. Thanks for your patience!
"
If I comment the "proxy_http_module" in the apache conf the wiki says "Permission denied...". ??
What should I do?
Posted 12:01, 23 Nov 2007
schtoll - I don't know if this afflicts you...BUT.. if MySQL is not running (OR..your wiki cannot connect to the database), you will get the 'Your wiki is down' message.
Posted 00:51, 28 Nov 2007
Hello All...I encounter an issue with my set-up. After the "Performing Installation" list of green items, we run into an issue. It says in red, the database has been created, but then it shows in green the following error message. We see that the database tables have been created (at least as far as we can tell). However, we can't move on to the next steps b/c of this error. Please Help, Please Advise!

Creating tables...A database error has occurred Query: INSERT into `pages` (`page_namespace`, `page_title`, `page_text`, `page_touched`, `page_user_id`, `page_timestamp`, `page_inverse_timestamp`) VALUES (0, '', 'Deki Wiki successfully installed.', 0, 1, '20071103195811', '79928896804188') Function: Error: 1364 Field 'page_comment' doesn't have a default value (localhost) Backtrace: GlobalFunctions.php line 430 calls wfBacktrace() Database.php line 378 calls wfDebugDieBacktrace() Database.php line 328 calls Database::reportQueryError() install-utils.inc line 129 calls Database::query() index.php line 1032 calls dbsource()
Posted 16:27, 20 Feb 2008
See here mattb:
http://forums.opengarden.org/showpost.php?p=2400&postcount=2
Posted 07:26, 5 Mar 2008
mysql-5.1.23 didn't work for me; I couldn't create stored procedures druing the web-based install. I found someone else had this problem and so I tried mysql-5.1.22 and the problem disappeared. I have other problems but MYSQL seems fine.
Posted 03:57, 25 Mar 2008
Minor bug... When creating the mindtouch.host.bat file, make sure that " (quotes) are placed around the CMD line. I have my Wiki installed into D:\program files\deki, and was getting the common d:\program is not a program error message. (Simple to fix, however it may not be obvious to everyone.)
Posted 03:30, 29 Mar 2008
I have successfully installed and everything seems fine except for image upload. After an upload of image, it doesn't display the image at all and a refresh of the page will show a broken image. The images are however found in the directory "attachment". File are having the same problem also. Any idea what could the problem be?

I read somewhere about http://forums.developer.mindtouch.com/showthread.php?t=1828 edited 09:02, 27 Jun 2008
Posted 08:46, 27 Jun 2008
From the sample how-to above, you would need to create
logs/apache folder in your c:/deki-hayes(or whatever folder you used)
Posted 18:57, 30 Jun 2008
Viewing 15 of 24 comments: view all
You must login to post a comment.