Windows Install Notes (mainly for IIS)
| 
PDF |
This document provides the general steps needed to install BugPort on Windows running IIS.
=============================================================================
Copyright 2003 INCOGEN, Inc.
This program is distributed under the terms of the BSD License (see the
license.txt file that was distributed along with this file for details).
INCOGEN, Inc. asks that credit be given when this code is used, and if
bug fixes or other beneficial changes are made to the code, that unified
diff patches (diff -uNr original-tree new-tree) be submitted. Please
submit patches to opensource@incogen.com.
BugPort 1.X Install Documentation
Please consult the system documentation for more general information
Jason Miller (2004/05/03): formatting, re-organization
Clay Campbell (2004/04/30): windows install notes additions
Kevin M Green (2004/04/30): windows install documentation
Dawn Cannan (2004/10/14): windows install notes additions
=============================================================================
Prerequisites
--------------------
BugPort Requires:
- PHP ADOdb Libraries - http://php.weblogs.com/adodb
- MySQL - mysql.com -
MySQL may need to be 4.0 or higher http://dev.mysql.com/downloads/
- Apache (or another PHP-capable web server such as IIS)
www.apache.org ( Apache recommended over IIS )
- PHP 4.3+ - www.php.net - CLI, the Command line Interface for PHP,
is installed with PHP 4.3+ by default and is optionally useful
in BugPort for stats generation; CLI may be required in the future
for an install script
- You will likely want a GUI administration client for the MySQL database server.
http://www.mysql.com/products/mysqlcc/
Installation Steps
--------------------
1) Install the web server, database server, and PHP per their normal methods.
INCOGEN's setup was installed by setting up MySQL first such that a MySQL
user can be created and that user is able to make tables and data rows.
2) Test that each is working and that PHP can "talk" to your database server.
From DOS prompt or From start menu (click Start -> click Run... -> type in cmd click OK )
You can test whether the MySQL server is working by executing any of the following commands:
C:\mysql\bin is the default install directory for MYSQL
Start MySQL by running mysqld
C:\> C:\mysql\bin\mysqld.exe ( this will take over your shell(dos prompt) so you'll
need to open a new one )
C:\> C:\mysql\bin\mysqlshow
C:\> C:\mysql\bin\mysqlshow -u root mysql
C:\> C:\mysql\bin\mysqladmin version status proc
C:\> C:\mysql\bin\mysql test
Optional: to show that PHP is installed properly you can
create a file "PHP_TEST.PHP" with these contents (b/t the <? and ?> tags)
<?php
// Show all information, defaults to INFO_ALL
phpinfo();
// Show just the module information.
// phpinfo(8) yields identical results.
phpinfo(INFO_MODULES);
?>
Save in the website root dir WINDOWS: C:\inetpub\wwwroot
then in the browser on the server go the the URL:
"http://<YOUR_SERVER>/php_test.php"
should show PHP version and configuration information
Optional: to show that PHP can talk to your MYSQL server you can
create a file "MYSQL_TEST.PHP" with these contents (b/t the <? and ?> tags)
<?php
/* Connecting, selecting database */
$link = mysql_connect("PUT YOUR SERVERNAME or IP HERE", "root", "")
or die("Could not connect : " . mysql_error());
echo "Connected successfully";
mysql_select_db("mysql") or die("Could not select database");
/* Performing SQL query */
$query = "SELECT * FROM user";
$result = mysql_query($query) or die("Query failed : " . mysql_error());
/* Printing results in HTML */
echo "<table>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "\t<tr>\n";
foreach ($line as $col_value) {
echo "\t\t<td>$col_value</td>\n";
}
echo "\t</tr>\n";
}
echo "</table>\n";
/* Free resultset */
mysql_free_result($result);
/* Closing connection */
mysql_close($link);
?>
Save in the website root dir WINDOWS: C:\inetpub\wwwroot
then in the browser on the server go the the URL: "http://localhost\mysql_test.php"
should show list of users in the MYSQL:USER table
3) create a directory in your HTML document root to hold bugport
NOTE: The bugport tar file will create a "bugport" directory for
you so you may not need to create a directory if "bugport" is OK.
WINDOWS running IIS:
1. Create the bugport directory in C:\inetpub\wwwroot
4) Unzip BugPort
Unzip the BugPort distribution into the directory so you get C:\inetpub\wwwroot\bugport
(Actually the tar file has bugport_#.### (bugport_1.108) as the directory it will create
using winzip) So unzip to the bugport_1.108 dir and then copy all the contents to the
bugport folder you created under .\wwwroot then get rid of the bugport_1.108 folder
5) IIS BugPort Configuration
Go into IIS configuration tool and make the bugport folder a web applcation
1. click start
2. click Control Panel
3. click Administrative Tools
4. click Computer management
5. Expand Services and Applications
6. Expand Internet Information Server
7. Expand Default Web Site
8. Highlight bugport folder and Right click
9. Select Properties and click
10. On the Directorty tab - click Create button system fills "bugport" in Application name
11. On Documents tab - make sure "index.html" is in the list at the top -
otherwise Click Add and add it
12. On Directory Security tab - Click Edit in Anonymous access and authentication control frame
13. On Authentication Methods form - uncheck Anonymous Access checkbox - check
Basic Authentication and click Edit in the Authenticated access frame
14. On Basic Authentication Domain form - provide domain name or leave blank (default)
15. Click Ok to both open forms to get back to Directory Security tab
16. Click OK to save the settings just entered - done - close the tools
17. You still must create the windows users and the matching BugPort user to test the
settings - see below
IIS ADODB installation
Extract the adodb*.zip here C:\inetpub\wwwroot\bugport\adodb or in your web server root
6) Create database schema
Create a MySQL user which will own all bugport database items (the username
"bugport" is assumed for this document):
Go back to your dos prompt:
C:\>cd c:\mysql\bin
C:\mysql\bin>mysql -u root -p
Enter password: *****
mysql>
CREATE DATABASE bugport;
GRANT ALL ON bugport.* TO bugport@localhost IDENTIFIED BY 'password';
If you wish, you may name the database something other than
"bugport" (note that if you choose to do this, you must run
'sed -i -e 's/USE bugport/USE dbname/' create_tables.sql', where
'dbname' is the database name that you have chosen). Also, you
probably want to change the 'password' in "IDENTIFIED BY 'password'"
to something a bit stronger. Execute the included BugPort SQL file
as that user in order to create the schema and some default database
entries:
mysql> source C:\inetpub\wwwroot\bugport\create_tables.sql
If you have a user table from some other database schema which you
would like to re-use, you may do so, but you will be required to edit the
<web root>\bugport\php_classes\Shared\User.php file to reflect the
structure of that user database table.
If you are using MySQL it is also recommended that you create another database
for your "bugport" MySQL user that will store database ID counters (sequences).
This is nice because it prevents your main bugport schema from becoming polluted
with all of the sequence tables that are needed. If you wish to do
this, run:
mysql>
CREATE DATABASE bugport_seq;
GRANT ALL ON bugport_seq.* TO bugport@localhost IDENTIFIED BY 'password';
//*********************************************************************************
//******** to show that PHP can talk to your BUGPORT DATAbase
//******** create a file "MYSQL_TEST.PHP" with these contents
//******** Save in the website root dir WINDOWS: C:\inetpub\wwwroot
//******** then in the browser on the server go the the URL: "http://localhost\mysql_test.php"
//******** should show list of users in the BUGPORT:IUSER table
//*******************************************************************************
<?php
/* Connecting, selecting database */
$link = mysql_connect("PUT YOUR SERVERNAME or IP HERE", "bugport", "password")
or die("Could not connect : " . mysql_error());
echo "Connected successfully";
mysql_select_db("bugport") or die("Could not select database");
/* Performing SQL query */
$query = "SELECT * FROM iuser";
$result = mysql_query($query) or die("Query failed : " . mysql_error());
/* Printing results in HTML */
echo "<table>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "\t<tr>\n";
foreach ($line as $col_value) {
echo "\t\t<td>$col_value</td>\n";
}
echo "\t</tr>\n";
}
echo "</table>\n";
/* Free resultset */
mysql_free_result($result);
/* Closing connection */
mysql_close($link);
?>
//*******************************************************************************
7) Setup the conf file and php.ini
The BugPort configuration file is: bugport\conf\config.conf
- Ensure that the $home variable is set to the full path of the bugport directory
(the directory that contains "php_classes")
$home = "c:\inetpub\wwwroot\bugport";
- Setup the 5 database related variables to match your database configuration
(server name, server port, user login, and type - note "type" is not yet in use )
- Configure the three schema variables. These may all be identical. These should
match the schema names (for oracle they typically are the same as the oracle user
name, for MySQL they are the "database" name). BugPort has multiple schemas
in order to support shared tables, such as user, which may be stored separately
from the other bugport tables.
Of special note is the $sequenceSchema variable. This should hold the name
of the schema/database you defined to hold sequences in step 6 above.
- Setup the other variables as needed.
$systemEmail
There is also a $systemEmail configuration setting in BugPort's conf\config.php.
It MAY need to a properly formed email address, but does NOT have to exist.
I would recommend using a value like "do_not_reply@foo.com".
This address shows in the "From:" header in the email sent from BUGPORT
$enableDebugging
if debugging is needed
turn on $enableDebugging=1;
turn off $enableDebugging=0;
Browse to <web root>\bugport\php\admin\setDebugging.php
Click the checkbox next to debug option you wish to see.
Click "Submit".
This debugging setting is stored in a cookie on your machine.
This change will NOT be visible to other BugPort users.
BugPort will produce information relating the the option you have selected when
that area of the system is accessed.
Remove the "$enableDebugging=1" from BugPort's conf\config.php.
This will cause BugPort to use the default value for all debugging flags
regardless of your cookie settings.
Modifying PHP.ini
On windows default PHP installation php.ini is located in the windows directory: usually
c:\winnt\php.ini
When using IIS, you might want to stop IIS when modifying php.ini.
IIS has a tendency to crash when this file or the c:\PHP directory is modified.
Ensure that all magic_quotes* are turned off in the php.ini
Optional - Changing the max upload size to allow for larger attachments
The directions below are for allowing attachments up to 24MB.
Change max_upload_size to 24M
Change post_max_size to 24M
Change memory_limit to 32M (24M + 8M)
MAIL settings: to set up for proper Windows mail processing
[mail function]
; For Win32 only.
SMTP = xxx.xxx.com
; (name of your outgoing SMTP server - You can get this by looking
; at your email accounts in your email client)
; For Win32 only.
sendmail_from =some_name@foo.com
; that is the name used by the mail() function for
; "From:" value if not overridden by additional mail headers
; which bugport does see conf.php
PHP.ini SESSION and COOKIE settings
This is what Works in our environmnet ...
[Session]
; Handler used to store/retrieve data.
session.save_handler = files
; Argument passed to save_handler. In the case of files, this is the path
; where data files are stored. Note: Windows users have to change this
; variable in order to use PHP's session functions.
session.save_path = C:\temp
; Whether to use cookies.
session.use_cookies = 1
8) Setup users, projects, and versions tables as needed.
There are a few tables that need "manual" management, at least until
web based tools are created to edit these tables. These tables are:
- iuser
- project
- user_project_usertype
Here is a template for a SQL statement to poulate this table
replace the [...] with the id number that matches the correct item to create the correct
relationship
insert into user_project_usertype (project_id, User_id, Usertype_id)
values( [project_id value], [User_id value], [Usertype_id value]);
The usertype_id values are:
+-------------+-------------------+
| usertype_id | name |
+-------------+-------------------+
| 2 | Developer |
| 4 | Designer |
| 7 | Quality Assurance |
| 112 | QA Lead |
+-------------+-------------------+
- version
- category
- instance
And in some case changes may be desired to these table's entries:
- commenttype
- frequency
- platform
- priority
- severity
- statcolumn
- type
Example rows are provided for all of the above tables and should be referred
to when editing/creating rows. Also, note that all primary key columns
for tables are auto_increment in MySQL (they will be named "<TABLENAME>_id")
9) Optional - Configuring Apache, if not using IIS
See unix bugport install docs for authentication setup for apache
Note that the htpasswd command will be slightly different under Windows. Instead of:
htpasswd -c /usr/local/apache/bugport.users a-bugport_username
The windows command will likely look like this:
C:\Program Files\Apache Group\Apache2\bin>htpasswd -c ..\bugport.users joeUser
Also see this PHP issue if using apache 2:
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=76976
10) WINDOWS security and authentication - if using IIS
Create users and groups
1. Click start
2. Highight Programs
3. Highlight Administrative tools
4. click Active Directory Users and Computers
5. Highlight Users in left pane - Highlight New and click Group
6. Type Bugport in Group Name field, click Global Group Scope radio button,
click Security Group Type radio button
7. Click OK - the Bugport group is created and shows in the list in the right pane
8. Highlight Users in left pane - Highlight New and click User
9. Enter First Name, Initials, Last Name, and User Logon Name
The User Logon Name is the name the the person will use to gain access to BugPort
and it must match the iser record that you have established.
10. Click Next and enter and confirm Password ( does not need to match the password setup
in Bugport at this time)
Only the password you enter here is authenticated for access to BugPort
11. Check the appropriate Password checkbox - and clcik Next
12. Review information you have provided and click Finish to create the user
13. User should show in the list in the right pane
14. Locate the User and Hightlight - Right clicl and Click Properties
15. On Member of Tab click Add
16. On Select Groups Form - Highight BugPort and Domain Users from the top list and
add to the bottom (selected) list
17. Click OK on the Slect Groups form and the Properties form to save the settings
you just made
18. repeat steps 8 through 17 for each user you wish to have access to BugPort
(remember that there must be a matching user in the BugPort iuser table as well)
19. You should test that each user you create can sign on successfully to the domain
and server running IIS.
I think that you must sign on with each user before the authentication will work
DNS server- sign on locally
If the IIS server is running on the Domain server - when you try to sign on with the users
that have been created you will recieve this message
"The local policy of this computer does not permit you to logon interactively."
and you must perform the following:
1. click start
2. Highight Programs
3. Highlight Administrative tools
4. Hightlight and click Domain Controller Security Policy
5. Expand Security Settings
6, Expand Local Policies
7. Highlight User Rights Assignment
8. Locate Log on locally in the list in the right pane and double click
9. Click Add
10. On the add user or group click Browse - then locate Bugport group from the top
list and Add to the bottom list
11. Click OK on all forms to save the settings you just entered
IIS Directory security
In order for BugPort to successfully prcess attachments users must have modify
privileges to the following directories
c:\inetpub\wwwroot\bugport - Bugport will create the following structure
[bugporthome]\files\attachments\[projectname]\[report_id]
c:\winnt\temp - system defined temporary folder so it may differ in your environment
1. Launch Windows file explorer
2. Brwose to the folder document above and highlight - right click and select Properties
3. On the Security tab click Add
4. On the Slect Users, Computers, or Groups form locate Bugport group in the top
list and Add it to the bottom list and click OK
5. On the Security tab - Bugport should show in the list - highlight it and check
the Modify checkbox in the Permissions list
6. Click OK to save the settings you have just entered
7. Repeat for all needed folders
11) Optional - scheduled task the Statistics Generation script
If you would like to use the "History" page, you will need to setup a daily
scheduled task job to save "count" information.
<webroot>\bugport\system\bin\executor.php
by Clay Campbell, Kevin Green, Jason Miller, Dawn Cannan