Actions

Installation on XP with IIS: Difference between revisions

From LimeSurvey Manual

No edit summary
No edit summary
 
(6 intermediate revisions by one other user not shown)
Line 5: Line 5:
* This guide is written for the web server novice. It is not meant as a definitive, perfect-10 install guide; this is just a recommended installation from me to you.
* This guide is written for the web server novice. It is not meant as a definitive, perfect-10 install guide; this is just a recommended installation from me to you.
* This guide will get a running LS configuration on Windows XP using Microsoft's Internet Information System web server (IIS), PHP5, and MySQL.
* This guide will get a running LS configuration on Windows XP using Microsoft's Internet Information System web server (IIS), PHP5, and MySQL.
* After completing this setup, you can login to an IIS-hosted website using your Windows username and password. Your windows account must have a password to be able to login!


=Install MySQL=
=Install MySQL=
Line 12: Line 13:
2. Run the Community Server install and make sure to select the below options
2. Run the Community Server install and make sure to select the below options


  a. ( = you may miss this, so make sure not to)
  a. (! = you may miss this, so make sure not to)


  b. Choose Custom Install
  b. Choose Custom Install


  c. Select to install all features and sub-features
  c. ! Select to install all features and sub-features


  d. Change install path to C:\mysql
  d. ! Change install path to C:\mysql


  e. Choose to configure server now. No need to register
  e. Choose to configure server now. No need to register
Line 34: Line 35:
  k. Enable TCP/IP
  k. Enable TCP/IP


  l. Check to add firewall exception
  l. ! Check to add firewall exception


  m. Enable strict mode
  m. Enable strict mode
Line 42: Line 43:
  o. Install as win service
  o. Install as win service


  p. Include bin directory in windows path
  p. ! Include bin directory in windows path


  q. Set password to password
  q. Set password to password
Line 96: Line 97:
  b. In config.php, set $rootDir='C:\Inetpub\wwwroot\limesurvey';
  b. In config.php, set $rootDir='C:\Inetpub\wwwroot\limesurvey';


=Compile and Install PHP=
=Install PHP=


<div class="simplebox">You can download the "php source .zip" from http://snaps.php.net/win32/^
Download the latest stable version of PHP Windows Binaries from http://php.net/downloads.php and extract it to c:\php.


1. PHP seems to have updated their compile instructions; I am using the old instructions in this guide. You can find a backup here: http://backupurl.com/wslmiy
==Configure PHP settings==
 
2. Follow the above guide up to the "Compiling" section, making sure to include the below libraries:
 
  a. freetype
 
  b. ICU
 
  c. libiconv
 
  d. libjpeg
 
  e. libpng
 
  f. libxml
 
  g. openssl
 
  h. zlib
 
3. Add MySQL for compiling php
 
  a. Copy all files from the bin, include, & lib folders in C:\mysql to the respective folders in C:\php\win32build
 
  b. If you do not see the above folders then you forgot to "Select to install all features and sub-features" when installing mysql
 
  c. Copy libmysql.lib from C:\mysql\lib\opt to C:\php\win32build\lib
 
  d. Make sure that C:\php\win32build\bin is in the system path (right-click my computer -> properties -> advanced -> environment variables -> under system variables, select path, and edit
 
4. Compile and Install PHP
 
  a. Open All Programs -> Microsoft Visual C++ 2008 Express Edition -> Visual Studio Tools -> Visual Studio 2008 Command Prompt
 
  b. Enter the following commands
 
  c. cd C:\PHP\src
 
  d. buildconf
 
  e. configure <nowiki><strike>enable-mbstring </strike>with-mysql=C:\mysql <strike>with-gd </strike>with-openssl</nowiki>
 
  f. nmake
 
  g. cd C:\PHP\src\Release_TS
 
  h. php -v
 
  i. If it complains about not finding modules for the configured extensions, don't worry- it's not a compile issue
 
  j. Copy the contents of c:\php\src\release_ts to c:\php
 
  k. From the php source .zip: copy php_mbstring.dll, php_mysql.dll, & php_openssl.dll to C:\php\ext
 
  l. Copy libeay32.dll from C:\php\win32build\bin to C:\php
 
4. Configure PHP settings


  a. Edit php.ini (it should be something like C:\php\php.ini-distribution). Rename it to php.ini and move it to C:\windows
  a. Edit php.ini (it should be something like C:\php\php.ini-distribution). Rename it to php.ini and move it to C:\windows


  b. Comment out the "doc_root =" line
  b. Comment out the "doc_root =" line, and set cgi.force_redirect = 0


  c. Enable your extensions (php_mbstring, php_mysql, php_openssl)
  c. Enable your extensions (php_mbstring, php_mysql, php_openssl)
  d. Make sure C:/php is in the system path (right-click my computer -> properties -> advanced -> environment variables -> under system variables, select path, and edit)


=Install and Configure IIS=
=Install and Configure IIS=
Line 170: Line 117:
2. Complete the install with the Windows XP Install Disk via i386 folder
2. Complete the install with the Windows XP Install Disk via i386 folder


2b. Copy php5isapi.dll from the php source .zip to C:\php (the same .zip you got the php_mbstring.dll, php_mysql.dll, & php_openssl.dll files from)
3. Copy php5isapi.dll from the php source .zip to C:\php (the same .zip you got the php_mbstring.dll, php_mysql.dll, & php_openssl.dll files from)


3. Open Control Panel -> Administrative Tools -> IIS
4. Open Control Panel -> Administrative Tools -> IIS


4. Expand local computer and right-click on websites -> properties
5. Expand local computer and right-click on websites -> properties


5. Set ISAPI Filters, Home Directory, and Documents tabs:
6. Set ISAPI Filters, Home Directory, and Documents tabs:


  a. ISAPI Filters: click Add... -> Filter Name = PHP && Executable = C:\php\php5isapi.dll
  a. ISAPI Filters: click Add... -> Filter Name = PHP && Executable = C:\php\php5isapi.dll
Line 184: Line 131:
  c. Documents: click Add... -> Default Document Name = index.php
  c. Documents: click Add... -> Default Document Name = index.php


6. Apply to the correct websites
7. Apply to the correct websites


=Set XP Security Permissions=
=Set XP Security Permissions=
Line 194: Line 141:
3. Under the security tab, select internet guest account, and check read and check write. Apply
3. Under the security tab, select internet guest account, and check read and check write. Apply


</div>When tweaking your settings, it may be necessary to restart the web service. Just open a command prompt and type ''iisreset''<div class="simplebox">
<div class="simplebox">When tweaking your settings, it may be necessary to restart the web service. Just open a command prompt and type ''iisreset''</div>

Latest revision as of 00:33, 16 July 2010

Install Overview

  • This guide is written for the web server novice. It is not meant as a definitive, perfect-10 install guide; this is just a recommended installation from me to you.
  • This guide will get a running LS configuration on Windows XP using Microsoft's Internet Information System web server (IIS), PHP5, and MySQL.
  • After completing this setup, you can login to an IIS-hosted website using your Windows username and password. Your windows account must have a password to be able to login!

Install MySQL

1. Download "MySQL Community Server" and "MySQL Workbench (GUI Tool)" from http://www.mysql.com/downloads/

2. Run the Community Server install and make sure to select the below options

  a. (! = you may miss this, so make sure not to)

  b. Choose Custom Install

  c. ! Select to install all features and sub-features

  d. ! Change install path to C:\mysql

  e. Choose to configure server now. No need to register

  f. Choose detailed configuration

  g. Choose Dedicated MySQL Server Machine (3rd option)

  h. Choose Multifunctional Database

  i. Default install path

  j. Decision Support (DSS)/OLAP

  k. Enable TCP/IP

  l. ! Check to add firewall exception

  m. Enable strict mode

  n. Standard character set

  o. Install as win service

  p. ! Include bin directory in windows path

  q. Set password to password

  r. Execute the install

3. Setup the LS schema (database)

  a. Open a command prompt and type the following commands

  b. cd C:\mysql\bin

  c. mysql -u root -p

  d. Enter mysql root user's password (should be password)

  e. CREATE DATABASE limesurvey;

  f. GRANT ALL PRIVILEGES ON limesurvey.* TO 'limesurveyuser'@'%' IDENTIFIED BY 'limesurvey';

  g. Exit the command prompt

4. Setup MySQL Workbench (GUI Tool)

  a. Start MySQL GUI Admin

  b. Login as root user to localhost

  c. Go to Tools -> Manage Connections

  d. Under General Options, check Store Passwords

  e. Under Connections, make a new connection:

     i.   Connection = lsu-connection

     ii.  Username = limesurveyuser

     iii. Password = password

     iv.  Hostname = localhost

     v.   Use the default port

     vi.  Schema = limesurvey

  f. Exit MySQL GUI Admin

5. Edit LS database settings

  a. Edit C:\inetpub\wwwroot\limesurvey\config.php to match the correct usernames and passwords

  b. In config.php, set $rootDir='C:\Inetpub\wwwroot\limesurvey';

Install PHP

Download the latest stable version of PHP Windows Binaries from http://php.net/downloads.php and extract it to c:\php.

Configure PHP settings

  a. Edit php.ini (it should be something like C:\php\php.ini-distribution). Rename it to php.ini and move it to C:\windows

  b. Comment out the "doc_root =" line, and set cgi.force_redirect = 0

  c. Enable your extensions (php_mbstring, php_mysql, php_openssl)

  d. Make sure C:/php is in the system path (right-click my computer -> properties -> advanced -> environment variables -> under system variables, select path, and edit)

Install and Configure IIS

1. Control Panel -> Add or Remove Programs -> Add/Remove Windows Components -> check IIS

2. Complete the install with the Windows XP Install Disk via i386 folder

3. Copy php5isapi.dll from the php source .zip to C:\php (the same .zip you got the php_mbstring.dll, php_mysql.dll, & php_openssl.dll files from)

4. Open Control Panel -> Administrative Tools -> IIS

5. Expand local computer and right-click on websites -> properties

6. Set ISAPI Filters, Home Directory, and Documents tabs:

  a. ISAPI Filters: click Add... -> Filter Name = PHP && Executable = C:\php\php5isapi.dll

  b. Home Directory: check Read, check Write, Execute Permissions = Scripts Only, click Configuration -> click Add -> Executable = C:\php\php5isapi.dll && Extension = .php

  c. Documents: click Add... -> Default Document Name = index.php

7. Apply to the correct websites

Set XP Security Permissions

1. Turn-off windows simple file sharing (google this if you don't know how)

2. Right click C:\inetpub\wwwroot\limesurvey and select properties

3. Under the security tab, select internet guest account, and check read and check write. Apply

When tweaking your settings, it may be necessary to restart the web service. Just open a command prompt and type iisreset