6.0.0-git
2018-12-10
Last Modified 2007-01-08 by Guest

How To Install Horde CVS on IIS6 Windows Server 2003.

  1. This document assumes the following:

Install PHP 4.3.7RC1

  1. Extract the files in the ZIP archive to C:\. Extracting the files will create a folder called C:\php-4.3.7RC1-Win32. Rename the folder to C:\php.
  2. Copy C:\php\php4ts.dll to C:\Windows\System32.
  3. Copy C:\php\php-ini-recommended to C:\Windows. Rename php-ini-recommended to php.ini
  4. Just to be safe, change the permissions on php.ini to EVERYONE: Read & Execute, Read. Ignore any warning you might see when you apply the permissions.
  5. Open C:\Windows\php.ini for editing
    • Search for “extension_dir” and change it to read: extension_dir = ".\extensions"
    • Search for “browscap”. Uncomment the browscap = line and change it to read: browscap = c:\windows\system32\inetsrv\browscap.ini
    • Search for “cgi.force_redirect”. Uncomment the cgi.force_redirect = line and change it to read: cgi.force_redirect = 0
    • Search for “upload”. By default uploads are enabled. Decide where you want the upload temporary directory to live, if necessary create that folder. Decide what the maximum allowed upload size and set:
      upload_tmp_dir = whatever folder you like
      upload_max_filesize = whatever size you like

      I use C:\temp and 64M respectively. The reason I set this directive is because if it’s not set PHP uses %TEMP% which is C:\Windows\Temp. I like to keep temp stuff clear of my %SYSTEMROOT%. Alternately you could change the %TEMP% and %TMP% system variables and leave this directive commented out. 64 megabytes might seem a bit excessive, but I run a small installation so I don’t worry about this as much as someone running a larger installation.
    • Optionally you can search for “doc_root” and change it to C:\Inetpub. That way any website created under that folder will have PHP capabilities. I left this directive blank.
    • Search for “Windows Extensions”. You’ll need to uncomment the following:
      • extension=php_domxml.dll
      • extension=php_gd2.dll
      • extension=php_gettext.dll
      • extension=php_iconv.dll
      • extension=php_imap.dll
      • extension=php_ldap.dll
      • extension=php_mbstring.dll
      • extension=php_mcrypt.dll
      • extension=php_mime_magic.dll
      • extension=php_openssl.dll
      • extension=php_pgsql.dll
    • You might not need all of the extensions listed here. In fact you probably don’t but I uncommented all of the extensions reported in the “PHP Module Capabilities” section of the Horde test script.
  6. Save and close the updated php.ini file.
  7. In order to get mcrypt support on Windows you’ll need libmcrypt.dll. (Refer to http://www.php.net/mcrypt). The dll is available at http://ftp.emini.dk/pub/php/win32/mcrypt/. Browse to this address, right-click on libmcrypt.dll and choose “Save Target as…” Save the dll in C:\php\dlls

Configure IIS6 to Allow PHP extensions

Before you start this process I recommend adding C:\php;C:\php\dlls to the system path. From what I’ve read about installing PHP on IIS6 this is a preference rather that a must. I added it for two reasons. The first is convenience; the second and more important is because there are a number of files in the dlls folder that are required to run the PHP extensions used by Horde. If the dlls folder is not in the path you have to copy the necessary dll to c:\Windows\system32 folder. So to avoid having to find and copy the appropriate dlls I strongly recommend adding these entries into the system path.

  1. Click "Start -> Administrative Tools -> Internet Information Services (IIS) Manger".
  2. Expand the local computer tree then click “Web Service Extensions” in the left-hand pane.
  3. Click the “Add a new Web service extension…” link under Tasks in the right hand pane.
  4. Enter PHP in the “Extension name:” box.
  5. Click the “Set extension status to Allowed” check box (Should be checked).
  6. Click the “Add” button then click the “Browse…” button. Browse to C:\php, change the “Files of type:” box to read “CGI exe files (*.exe)”. Double-click on php.exe. Finally click the "OK" button twice.

Add PHP to IIS6 Web Sites

There is a decision to make at this point. We can add PHP functionality to the Web Sites folder or we can simply add it to the Default Web Site. The benefit to adding PHP to the Web Sites folder is that any new web site will inherit the settings. Conversely, if you choose not to configure the Web Sites folder to use PHP then you’ll have to add the functionality to each new web site as you create it. I’ll cover both options here.

  1. Right Click on the “Default Web Site” entry under the “Web Sites” folder in the left-hand pane and choose “Properties” OR Right-click on the “Web Sites” folder in the left-hand pane and choose “Properties”.
  2. Click the “Home Directory” tab then click the “Configuration…” button
  3. Click the “Add…” button. Browse to C:\php, change the “Files of type:” box to read “CGI exe files (*.exe)”. Double-click on php.exe.
  4. Enter PHP in the “Extensions:” box. Make sure the “Script Engine” box is checked. Leave “Verify file exists” checked if you want or you may uncheck it. I chose to uncheck it.
  5. Click the “OK” button twice to return to the “Default Web Site Properties” page. If you are applying these changes to the Web Sites folder you’ll return to the “Web Sites Properties” page.
  6. Change the “Execute Permission” box to read “Scripts and Executables”
  7. Click the “Documents” tab.
  8. Click the “Add…” button and enter index.php in to the “Default content” page: box.
  9. Click the “Move up” button until index.php appears at the top of the list.
  10. Click the OK button.
  11. If you are applying these setting to the Web Sites folder you will see an “Inheritance Overrides” dialog box asking which “Child Nodes” to apply the settings to. Click the Select All button then the OK button.

Test the PHP installation

  1. First it’s a good idea to stop and start the IIS services. I found it much easier and cleaner to do this from a Command Prompt. So open a Command Prompt and type:
    • net stop iisadmin <enter>
    • Say “YES” to the following message:
      The following services are dependent on the IIS Admin Service service.
      Stopping the IIS Admin Service service will also stop these services.
      World Wide Web Publishing Service
      HTTP SSL
      Do you want to continue this operation? (Y/N) [N]:
  2. The services will stop and you will be returned to the Command Prompt. To start the IIS services type:
    net start w3svc <enter>
  3. Open notepad and enter the following text:
    <? phpinfo(); ?>
  4. Save the file as C:\Inetpub\wwwroot\phptest.php
    CAUTION: Don’t forget that Windows will try to add .txt to the end of the filename.
  5. Open your favorite browser and go to http://hostname/phptest.php If all is well you’ll see:
    PHP Version 4.3.7RC1
    
    System 
    Windows NT HATRICK 5.2 build 3790 
    Build Date 
    May 25 2004 15:27:35 
    Server API 
    CGI/FastCGI 
    Virtual Directory Support 
    enabled 
    Configuration File (php.ini) Path 
    C:\WINDOWS\php.ini 
    PHP API 
    20020918 
    PHP Extension 
    20020429 
    Zend Extension 
    20021010 
    Debug Build 
    no 
    Thread Safety 
    enabled 
    Registered PHP Streams 
    php, http, ftp, compress.zlib 
    
    This program makes use of the Zend Scripting Language Engine:
    Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

Install PEAR Using the Provided PHP Scripts

  1. Open a Command Prompt
  2. CD to C:\php
  3. Execute: go-pear.bat <enter>. You’ll see:
    Welcome to go-pear!
    
    Go-pear will install the 'pear' command and all the files needed by
    it.  This command is your tool for PEAR installation and maintenance.
    
    Go-pear also lets you download and install the PEAR packages bundled
    with PHP: DB, Net_Socket, Net_SMTP, Mail, XML_Parser, PHPUnit-0.6.2.
    
    If you wish to abort, press Control-C now, or press Enter to continue:
    1. Press Enter to continue. You’ll see:
      HTTP proxy (http://user:password@proxy.myhost.com:port), or Enter for none:
    2. Enter the proxy information if needed, otherwise Enter to continue. You’ll see:
      Below is a suggested file layout for your new PEAR installation.  To
      change individual locations, type the number in front of the
      directory.  Type 'all' to change all of them or simply press Enter to
      accept these locations.
       1. Installation prefix               : C:\php
       2. Binaries directory                : $prefix
       3. PHP code directory ($php_dir)     : $prefix\pear
       4. Documentation base directory      : $php_dir\docs
       5. Data base directory               : $php_dir\data
       6. Tests base directory              : $php_dir\tests
       7. php.exe path                      : C:\php\cli\php.exe
      1-7, 'all' or Enter to continue:
    3. Make any changes you need and press Enter to continue. Based on these installation instructions the defaults are acceptable.
    4. Say “YES” to the following prompt:
      The following PEAR packages are bundled with PHP: DB, Net_Socket, Net_SMTP,
      Mail, XML_Parser, PHPUnit-0.6.2.
      Would you like to install these as well? [Y/n] :
    5. You’ll see:
      Loading zlib: ok
      Using local package: PEAR.............ok
      Using local package: Archive_Tar......ok
      Using local package: Console_Getopt....ok
      Using local package: XML_RPC..........ok
      Bootstrapping: PEAR...................(local) ok
      Bootstrapping: Archive_Tar............(local) ok
      Bootstrapping: Console_Getopt.........(local) ok
      Using local package: DB...............ok
      Using local package: Net_Socket.......ok
      Using local package: Net_SMTP.........ok
      Using local package: Mail.............ok
      Using local package: XML_Parser.......ok
      Downloading package: PHPUnit-0.6.2....ok
      Extracting installer..................ok
      install ok: PEAR 1.3.1
      install ok: Archive_Tar 1.1
      install ok: Console_Getopt 1.2
      install ok: XML_RPC 1.1.0
      install ok: DB 1.6.1
      install ok: Net_Socket 1.0.1
      install ok: Net_SMTP 1.2.5
      install ok: Mail 1.1.2
      install ok: XML_Parser 1.0.1
      install ok: PHPUnit 0.6.2
      
      ******************************************************************************
      WARNING!  The include_path defined in the currently used php.ini does not
      contain the PEAR PHP directory you just specified:
      <C:\php\pear>
      If the specified directory is also not in the include_path used by
      your scripts, you will have problems getting any PEAR packages working.
      
      Would you like to alter php.ini <C:\WINDOWS\php.ini>? [Y/n] :
    6. Say “YES” to updating your php.ini file. You’ll see:
      php.ini <C:\WINDOWS\php.ini> include_path updated.
      Note: this entry is added at the very bottom of your php.ini.
      
      Current include path               : .;c:\php4\pear
      Configured directory               : C:\php\pear
      Currently used php.ini (guess)     : C:\WINDOWS\php.ini
      Press Enter to continue:
    7. Press Enter and you’ll see:
      The 'pear' command is now at your service at C:\php\pear.bat
      
      * WINDOWS ENVIRONMENT VARIABLES *
      For convenience, a REG file is available under C:\php\PEAR_ENV.reg .
      This file creates ENV variables for the current user.
      
      Double-click this file to add it to the current user registry.
      
      Press any key to continue . . .
    8. Press any key to return to the command prompt.
    9. Browse to C:\php and double-click on PEAR_ENV.reg to import the registry information.
    10. Next add the PEAR packages which are required by Horde (You should already be in C:\php, if not CD to that directory):
      • Log – From the command prompt: pear install log <enter>. Ignore the message: Optional dependencies: 'sqlite' PHP extension is recommended to utilize some features.
      • Mail Mime – From the command prompt: pear install mail_mime <enter>
      • Date -- From the command prompt: pear install date <enter>
      • Auth_SASL -- From the command prompt: pear install auth_sasl <enter>
      • HTTP_Request -- Has pre-requisites. Follow this path:
        • From the command prompt: pear install net_url <enter>
        • From the command prompt: pear upgrade net_socket <enter>
        • From the command prompt: pear install http_request <enter>
      • File: -- From the command prompt: pear install file <enter>
      • Services_Weather -- Has pre-requisites. Follow this path:
        • From the command prompt: pear install cache <enter>
        • From the command prompt: pear install net_dime-beta <enter>
        • From the command prompt: pear install soap-beta <enter>
        • From the command prompt: pear install xml_util <enter>
        • From the command prompt: pear upgrade xml_parser <enter>
        • From the command prompt: pear upgrade xml_serializer <enter>
        • From the command prompt: pear install services_weather <enter>
      • Just for grins and giggles execute pear upgrade-all <enter>

Install MySQL 4.0.18

  1. Extract the files from mysql-4.0.20a-win.zip into a temporary folder.
  2. Browse to that folder and double-click on SETUP.EXE.
  3. The installation wizard will start. You can simply accept all of the defaults. Click the Finish button when the installation finished.
  4. Optionally add C:\mysql\bin to the system path. I do this out of convenience. It makes it easier when you execute the Horde DB scripts.
  5. Open notepad or your favorite text editor and enter the following text:
    [mysqld]
    # set basedir to your installation path
    basedir=C:\\mysql
    # set datadir to the location of your data directory
    datadir=C:\\mysql\\data
    
    [WinMySQLAdmin]
    Server=C:\\mysql\\bin\\mysqld-nt.exe
    QueryInterval=10
  6. If you installed MySQL into a different folder you’ll need to change the basedir = to point to your installation point. Additionally you need to add a different path to the system path variable. If you want to store your databases in a different location, create that folder structure and change the datadir= to point to that location. Beware that if you want to use back slashes in your my.ini, you need to use \\ otherwise use forward slashes.
  7. Save the file as C:\Windows\my.ini
    CAUTION: Don’t forget that Windows will try to add .txt to the end of the filename.
  8. Open a Command Prompt and give MySQL a test by entering:
    mysqld –console <enter>

    Of all the information displayed, you’re only interested in weather or not MySQL reports:
    mysqld: ready for connections.
    Version: '4.0.20a-debug'  socket: ''  port: 3306 
    Press CTRL+C to stop MySQL
  9. Now we can install the MySQL daemon as a service by entering:
    mysqld –install <enter>

    You should receive a Service successfully installed.
  10. Start the MySQL service by typing
    net start mysql <enter>

    You should see: The MySQL service was started successfully.
  11. Reset the MySQL root password by entering:
    mysql -u root <enter>

    You’ll get a mysql> prompt. Enter the following command replacing newpwd with whatever password you want to use:
    SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpwd'); <enter>

    You should see: Query OK, 0 rows affected (0.14 sec)
  12. Test the MySQL installation by entering:
    mysql –user=root –password=your_password mysql

    You should see:
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 5 to server version: 4.0.20a-debug
    
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    
    mysql>

    Type exit <enter> to close the MySQL shell.

Install Aspell 0.05-3 with the English dictionary.

  1. Double-click Aspell-0-50-3-3-Setup.exe to start the Aspell installation wizard.
  2. Click the Next > button twice.
  3. Change the Destination Directory to C:\aspell and click the Next > button.
  4. Accept the defaults for the remainder of the installation wizard. The last screen will ask if you want to view manual.html. Leave it checked if you do, otherwise uncheck it and click the Finish button.
  5. Double-click Aspell-en-0.50-2-3.exe to start the Aspell dictionary installation wizard.
  6. The installer should find your base Aspell installation directory and simply add the dictionary so you should be able to accept the defaults for the entire installation wizard.
  7. You can type \aspell\bin\aspell –config <enter> at a Command Prompt to see your current configuration.

Install WinCVS

  1. Extract the contents of WinCvs13b17-2.zip to a temporary folder.
  2. Execute setup.exe to start the installation wizard.
  3. Click the Next > button
  4. Click “I accept the agreement” radio button then the Next > button twice.
  5. If desired change the destination directory and click the Next > button. I’m keeping things consistent so I changed the destination directory to C:\WinCVS.
  6. If desired, change the installation type and click the Next > button. As I said earlier, I’m only interested in the command line version so I changed the installation to custom and unchecked everything except “Core executable files” and “Command line client files”.
  7. Check “Don’t create a Start Menu” folder then click the Next > button
  8. Uncheck “Create a desktop item” and “Create a shell context menu” and click the Next > button.
  9. Click the “Install” button then the “Finish” button.

Checkout Horde and Horde Framework Modules from CVS.

The first item to consider is where to put your Horde installation. Like I said I have a relatively small installation, however I support two domains. I’m writing this document while installing Horde on my development server which is much different than my production server. So I’m going to choose C:\Inetpub\horde as my installation point. This seen the easiest place to put Horde, plus if you set the doc_root directive in your php.ini to C:\Inetpub, it keeps things simple. In any case, I think it’s important to give some thought to where you want Horde to live. Now…here we go…

  1. Open a Command Prompt
  2. CD to C:\Inetpub
  3. Execute the following:
    SET CVSROOT=:pserver:cvsread@anoncvs.horde.org:/repository <enter>
    \WinCVS\CVSNT\cvs login <enter>

    You’ll be prompted with:
    Logging in to :pserver:cvsread@anoncvs.horde.org:2401:/repository
    CVS password: 
  4. Type the password and press Enter. You’re now logged into the CVS repository.
  5. Type \WinCVS\CVSNT\cvs co -r HEAD horde <enter>
  6. Once the download completes, make your directory C:\Inetpub\horde and execute:
    \WinCVS\CVSNT\cvs co -r HEAD framework <enter>
  7. Now that you have the basic framework installed you can continue to check out other modules you want. Personally I use IMP, Ingo, Jonah, Klutz (for fun) Kronolith, Mnemo, Nag, Passwd, and Turba.
  8. Once you’ve got all the modules you want execute \WinCVS\CVSNT\cvs logout <enter>.
  9. CD to Inetpub\horde\config directory
  10. Execute copy *.dist *. <enter>
  11. If you’ve downloaded any other modules, CD into their respective config (e.g. \imp\config) folders and execute the copy command from step #10.

Install the Horde Framework.

Before moving on we need to install the Horde Framework. Follow these steps to complete this process.

  1. Open a Command Prompt.
  2. CD to C:\Inetpub\horde\framework
  3. Execute \php\cli\php –q install-packages.php <enter>

Note that if you do not specify the path to the client php executable the system will generate a “Bad Option” error message. This is one because the system path specifies C:\php and the php.exe that lives there is the CGI executable.

Add the Horde Site to IIS6.

  1. Click "Start -> Administrative Tools -> Internet Information Services (IIS) Manger".
  2. Expand the local computer tree then right-click the Web Sites folder and select New then Web Site…
  3. The Web Site Creation Wizard will start. Simply click the Next > button to continue.
  4. Enter a description in the Description: box and click the Next > button.
  5. Set the appropriate IP Address and Port settings. The defaults should be fine. Click the Next > button.
  6. Enter C:\Inetpub\ for the path. Leave “Allow anonymous access to this Web site” checked and click the Next > button.
  7. Check Execute (Such as ISAPI application or CGI) and click the Next > button.
  8. Click the Finish button.
  9. Stop the Default Web Site using the Stop item button on the IIS Manager Tool bar.
  10. Start your new web site using the Start item button on the IIS Manager Tool bar.

If you added PHP to the “Web Sites” folder you can move onto the next step. Otherwise you’ll need to repeat the from the “Add PHP to IIS6 Web Sites” section above steps on your new web site.

Testing Horde

Open your favorite browser and go to http://hostname/horde/test.php. If all is well you’ll see:

Notes:
According the PHP web site MCAL is not supported on Windows. See the notes section of http://www.php.net/manual/en/ref.mcal.php

I tried to install the PECL fileinfo extension using the pear install fileinfo-beta command. However, it errors out with: “The DSP Fileinfo.dsp does not exist.” To date I have not found a workaround.