Thursday, April 3, 2008

Xampp on WinXP - Deki Wiki

Xampp on WinXP - Open Garden

have just installed and got working Deki-Hayes on WinXp for a second time. I wrote down what I did this time so I wrote a tutorial that I think works well.

I recommend downloading the formatted Word doc from
http://wiki.opengarden.org/User:Abarras

Installing Deki-Hayes 1.8.1c on WindowsXP Pro using Xampp.
By: Andrew Barras
abadger AT bellsouth.net

Much of this guide is similar to PeteE’s guide located at http://wiki.opengarden.org/User:Pete...llation_(Hayes)

The only main differences are this one uses Xampp which greatly simplifies things. Also I have not had any luck installing Aspell yet so this guide leaves it out.

Part 1: Installations
Downloads required:

1. Xampp 1.6.3a win32 Basic Package
2. Deki_Wiki_1.8.1c_Hayes_source
3. ImageMagick-6.3.5-5-Q16-windows-dll
4. Dot Net 2.0 Framework

Disable IIS to free the required ports: (if not installed then skip this)

1. Go to All Programs->Administrative Tools->Internet Information Services (IIS) Manager.
2. If necessary, expand the Web server that you want, and then expand Web Sites.
3. Right-click the Web site that you want to change. (Default)
4. Click Properties.
5. Click the Web Site tab.
6. Change the TCP Port Number in the TCP Port edit box and change it to something other than 80. (20001 should be good)
7. Click OK to save the changes.

8. Go to All Programs->Administrative Tools->Services
9. Find IIS Admin.
10. Right click to bring up Properties.
11. Change Startup type to Disabled.
12. Press the Stop button if it is not grayed out.
13. Close those windows.

Installing the Dot Net 2.0 Framework

1. Double-click the installable file "dotnetfx.exe"

2. Follow the prompts.


Installing Deki-Hayes

1. Unzip the downloaded file. (Deki_Wiki_1.8.1c_Hayes_source)

2. Copy it to where you want your Wiki directory to be. Remember this location. (Ex. C:\deki-hayes)

3. Copy file mono.posix.dll
a. from C:\YOUR_INSTALL_LOCATION\src\redist
b. to c:\YOUR_INSTALL_LOCATION\web\bin


Installing Xampp

1. Run the installer
a. Check Install Apache as Service
b. Check Install MySQL as service

2. Press Install. If WinXP comes up with a security alert, roll your eyes, then press Unblock.

3. The installer will test all the ports for you.

a. If it says success then run the Xampp control panel when it asks you to.
b. If it says you have a problem, run xampp-portcheck.exe in the Xampp directory. See what is blocking the ports and turn off that stuff. (usually it is IIS)

4. When the Xampp control panel comes up it should say Apache Running and MySql Running. If either of these are not shown as running then you probably have a port conflict.

5. Keep the control panel open as we will want to restart Apache a few times.

6. Test if everything is working at this point by loading http://localhost/index.php in a browser. You should see a Xampp splash screen. Xampp, Php, MySQL, and Apache are installed and configured.

Install ImageMagick.

1. Use all the defaults to install it.

Copy Curl dlls

1. In order for Curl to work, you need to
a. Copy C:\xampp\php\libeay32.dll and C:\xampp\php\ssleay32.dll
b. to C:\windows\system32\

Part 2: Configuration

Note: There are several files of the same name in the Xampp directory (such as multiple php.ini files) so read carefully and open the right one.

Configure PHP and Curl

1. Open C:\xampp\apache\bin\php.ini

2. Set short_open_tag = On

3. Remove the semicolon from in front of extension=php_curl.dll

4. Save and exit.


Configure Apache.

1. Open C:\xampp\apache\conf\httpd.conf

2. Enable the following Modules by removing the # at the front of the line.
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so


The Virtual Host stuff needs to be added in a specific location or it will mess up.

1. Find this text: mod_mime_magic module

2. Immediately above that there is a line called . Right after that line add the following:


DocumentRoot "c:/deki-hayes/web"
ServerName deki-hayes

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

RewriteCond %{REQUEST_URI} !/(@api|editor|skins|config)/
RewriteCond %{REQUEST_URI} !/(redirect|texvc|index|Version).php
RewriteCond %{REQUEST_URI} !/error/(40(1|3|4)|500).html
RewriteCond %{REQUEST_URI} !/favicon.ico
RewriteCond %{REQUEST_URI} !/robots.txt
RewriteCond %{REQUEST_URI} !/dummy.php
RewriteCond %{REQUEST_URI} !/phpinfo.php
RewriteCond %{QUERY_STRING} ^$ [OR] %{REQUEST_URI} ^/Special:Search
RewriteRule ^/(.*)$ /index.php?title=$1 [L,QSA,NE]

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



3. Change the DocumentRoot above to show the path to where you are putting Deki-hayes.

4. Change the ServerName above to show the name of your Wiki server.

5. Find .

6. Add Allow from all right after Deny from all.

Restart Apache

1. Using the Xampp control panel, restart Apache. (wait a few seconds between stopping and starting it)

2. If you typed everything right, you should get Apache to say Running again. If it doesn't come back up, you missed a step or did something wrong. Try running the apache_start.bat file in the Xampp directory. It will give you more information about where it is failing.

Part 3: Running Deki-Hayes install

1. In a web browser type http://localhost/

2. The Deki install page now comes up. It should give errors about ImageMagick Identify and about Aspell but otherwise says you are OK to install.

3. Fill out the info about your wiki.

a. For Superuser password, there is none right now so leave it blank.

b. Make sure ImageMagick is set up correctly. (Identify is blank. Fill it in as below)

i. ImageMagick convert: C:\Program Files\ImageMagick-6.3.5-Q16\convert.exe

ii. ImageMagick identify: C:\Program Files\ImageMagick-6.3.5-Q16\identify.exe

4. Press Install Deki Wiki

5. Do the last commands at the end of the resulting install page. (you don't have to do them from the command line on Windows. )

Note: the last step is to run the command mindtouch.host.bat, which opens a cmd window. DO NOT CLOSE THIS WINDOW. Leave it open. Minimize it if you want. This batch file starts the actual Deki server (which is written in .NET). You may be accustomed to closing command windows after running batch files - your instinct to do so will cause endless frustration, so don't do it. There are methods to running this batch file as a Windows service, one of which is covered here.

6. You should now be able to type http://localhost/index.php and get your Wiki up!

The way the captcha code is written it won't work on WinXp so we have to diable it. If not, we won't be able to create users!

I removed the captcha checking from my installation by changing the following:

In file includes\SpecialUserlogin.php

1. change line 336 from if (captcha::check()) to if (true) (line 352 in v1.8.2)

2. comment out ( put // at the front of the line) lines 522, 523, 524 and 587-594

(v1.8.2: lines 532-534, 596-604)

3. Save the file.

No comments: