TestLink Install Guide for Windows 2008 R2 w/ IIS

Ask community to help.

Moderators: Amaradana, TurboPT, TL Developers

jack090
Advanced user
Posts: 39
Joined: Tue Dec 21, 2010 4:16 pm

TestLink Install Guide for Windows 2008 R2 w/ IIS

Post by jack090 »

I have seen lots of posts on getting help with Windows Server 2008. I recently had to setup a Windows Server 2008 R2 server with and Microsoft Sql Server 2008 (mssql) for using TestLink. This is a rough guide to basically get everything setup from a fresh install of the OS to running testlink.

1. Open Server Manager -> Click Roles -> Add Roles -> Select Web Server (IIS) -> click CGI Checkbox under Application Development -> Install
2. Download and extract latest testlink files to C:\inetpub\wwwroot (or whatever folder you want to use as long as you configure IIS to point there. I'm using the default in this case.)
3. Download Microsofts Web Platform Installer. It's imperative that you use version 5.2 instead of 5.3 (5.3 php no long supports the method calls used by testlink). http://www.microsoft.com/web/gallery/in ... ppid=PHP52 I used: v. 5.2.17 in this example.
4. Install using defaults. On the last page of the Web Platform Installer it asks to add items. You don't need to use anything on that screen so just press Exit.
5. Start -> Run -> Type inetmgr -> Ok
6. Expand your server -> Expand Sites -> Click Default Web Site
7. Double Click PHP Manager
8. Click Enable or disable an extension
9. Find php_mssql.dll and click enable (Optional if you want to use Active Directory authentication also enable php_ldap.dll).
10. Browse to http://localhost (It should bring you to localhost/install).
11. Go through steps until you get to the DB section.
12. At this point I usually setup the DB manually by Creating a database on the sql server I want to use (Microsoft Sql Server 2008 in my case). I typically do this because I have greater control on the SQL side and usually lock it down.
- I won't go into creating a database user but it's good practice to create it manually w/ db_owner rights. Also I manually created the tables using the 2 scripts located in \install\sql\mssql.
- Use the testlink_create_tables.sql first then testlink_create_default_data.sql and continue on
13. At this point you should be able to follow the prompts and get the bare bones up and running with a testlink operational.

I typed this up mostly from memory so if anyone wants to point out any problems please feel free too.
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: TestLink Install Guide for Windows 2008 R2 w/ IIS

Post by fman »

Thanks a lot I'm going to tweet this and add as PDF on next distribution
jack090
Advanced user
Posts: 39
Joined: Tue Dec 21, 2010 4:16 pm

Re: TestLink Install Guide for Windows 2008 R2 w/ IIS

Post by jack090 »

I forgot to mention you might have to play with the security settings on the wwwroot folder. If you see a blank page it's because certain files need to have modify access to the website. I know for a fact you will need to give read + write + execute abilities to the logs folder in order to troubleshoot and see errors etc... If you need to troubleshoot then give full access to usrs/iis_usr's on the folders til your problem goes away.
jack090
Advanced user
Posts: 39
Joined: Tue Dec 21, 2010 4:16 pm

Re: TestLink Install Guide for Windows 2008 R2 w/ IIS

Post by jack090 »

These are my ldap settings for Active Directory use. Also note that I have $tlCfg->authentication['ldap_root_dn'] = 'DC=domain,DC=local'; . This would be if I was on something like: testlink.domain.local (Change accordingly).

$tlCfg->authentication['method'] = 'LDAP';
/** LDAP authentication credentials */
$tlCfg->authentication['ldap_server'] = '<YOUR SERVER>';
$tlCfg->authentication['ldap_port'] = '389';
$tlCfg->authentication['ldap_version'] = '3'; // could be '2' in some cases
$tlCfg->authentication['ldap_root_dn'] = 'DC=bai,DC=local';
$tlCfg->authentication['ldap_organization'] = ''; // e.g. '(organizationname=*Traffic)'
$tlCfg->authentication['ldap_uid_field'] = 'sAMAccountName'; // Use 'sAMAccountName' for Active Directory
$tlCfg->authentication['ldap_bind_dn'] = '<Your Service Account Name'; // Left empty for anonymous LDAP binding
$tlCfg->authentication['ldap_bind_passwd'] = '<Your Service Account Password'; // Left empty for anonymous LDAP binding
$tlCfg->authentication['ldap_tls'] = false; // true -> use tls
jack090
Advanced user
Posts: 39
Joined: Tue Dec 21, 2010 4:16 pm

Re: TestLink Install Guide for Windows 2008 R2 w/ IIS

Post by jack090 »

One last install instruction is to run this on your TestLink DB. (If you don't you can't add test cases or view them. I think this is probably fixed in 1.9.4).

ALTER TABLE dbo.tcversions ADD
status smallint NOT NULL CONSTRAINT DF_tcversions_status DEFAULT ((1))
jack090
Advanced user
Posts: 39
Joined: Tue Dec 21, 2010 4:16 pm

Re: TestLink Install Guide for Windows 2008 R2 w/ IIS

Post by jack090 »

It appears in 1.9.4 you will need to edit the config.inc.php $tlCfg->log_path to be:

$tlCfg->log_path = TL_ABS_PATH . 'logs' . DIRECTORY_SEPARATOR ;
$g_repositoryPath = TL_ABS_PATH . "upload_area" . DIRECTORY_SEPARATOR ;

(this defaults it back to 1.9.3 behavior)

If you would like to put it somewhere that isn't standard remember to use C:/intepub/wwwroot... (You must switch the slashes around in order to make it work. Otherwise you will get internal server error 500's)
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: TestLink Install Guide for Windows 2008 R2 w/ IIS

Post by fman »

Using paths placed like 1.9.3 or lower, can create a potential security issue.
That's why we have changed it
jack090
Advanced user
Posts: 39
Joined: Tue Dec 21, 2010 4:16 pm

Re: TestLink Install Guide for Windows 2008 R2 w/ IIS

Post by jack090 »

As it stands right now the changes added to 1.9.4 cause Windows Server 2008 R2 to fail. Apparently the fix in: http://mantis.testlink.org/view.php?id=5209 doesn't work for us. I will try to trace it down but I keep getting PHP Fatal Error: Call to undefined function utf8_strtolower(). I have the required mbstring.dll added (as it is installed by default in the steps above) but it keeps throwing the error. I will add it to mantis once I can track down where the breakdown exists. (I also took the latest code from http://gitorious.org/testlink-ga/testlink-code and it just gives me a blank screen). Again I'll take a stab at this a little more and add everything on mantis when I figure out the real problem. ~ Jack
GunnarD

Re: TestLink Install Guide for Windows 2008 R2 w/ IIS

Post by GunnarD »

The code in http://gitorious.org/testlink-ga/testlink-code has an error (is reporter on mantis day after release of 1.9.4), please fman release a 1.9.4a (or something) that fix this problem.

There is no utf8_strtolower() function, but there is a mb_strtolower() function in mbstring, so change utf8_strtolower() to mb_strtolower() and it should work.

The error is only seen when using https and it's on all platforms/os.
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: TestLink Install Guide for Windows 2008 R2 w/ IIS

Post by fman »

Please @Jack
a) Reopen issue on Mantis adding the text you have put here
'As it stands right now the changes added to 1.9.4 cause Windows Server 2008 R2 to fail. Apparently the fix in: http://mantis.testlink.org/view.php?id=5209 doesn't work for us. I will try to trace it down but I keep getting PHP Fatal Error: Call to undefined function utf8_strtolower(). I hav .....'.

This way other people will be informed of issue on ISS

b) Great for: >> gain I'll take a stab at this a little more and add everything on mantis when I figure out the real problem. ~ Jack


regards
Francisco
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: TestLink Install Guide for Windows 2008 R2 w/ IIS

Post by fman »

@GunnarD
Jack has pointed to the fix http://mantis.testlink.org/view.php?id=5209

We are not going to release 1.9.4.a or somethings like that, we have provided on Mantis a issue with all available fixes, that people have to get.
We can only add in forum on 1.9.4 section a reminder of this.
(http://www.teamst.org/forum/viewtopic.php?f=25&t=7014) (done!)

And again and again: do not ask for issue fixes here is not the place, you have to go to mantis, search for similar issues, if nothing found (after removing the filter status), report issue, and wait till will be able to provide solution.
This is the path, the only path we are going to follow.
GunnarD

Re: TestLink Install Guide for Windows 2008 R2 w/ IIS

Post by GunnarD »

He write that the error is "PHP Fatal Error: Call to undefined function utf8_strtolower()" this seems to me that he does not have applied the fix/patch.
jack090
Advanced user
Posts: 39
Joined: Tue Dec 21, 2010 4:16 pm

Re: TestLink Install Guide for Windows 2008 R2 w/ IIS

Post by jack090 »

Ok good news and bad news. The good news is the fix above (http://mantis.testlink.org/view.php?id=5209) works for 1.9.4.

The bad news is that the DB create scripts for MSSQL aren't exactly right which is why it was just "spinning" and not displaying anything. I went through an upgrade process with a copy of our production testlink DB that was at 1.9.4 and followed the steps (with some clean-up to the script for MSSQL) and testlink login screen came right up. If trying to use the "create" scripts with a brand new DB there's something missing that is causing MSSQL not to work. I would suggest for now until I have time to go through the create scripts to just "manually" install 1.9.3 DB and use the upgrade scripts for 1.9.4 instead of using the full "create" scripts for MSSQL 1.9.4.

Fman: I'll try and get this added to mantis today (as the forum isn't the appropriate place. )
jack090
Advanced user
Posts: 39
Joined: Tue Dec 21, 2010 4:16 pm

Re: TestLink Install Guide for Windows 2008 R2 w/ IIS

Post by jack090 »

Sorry the following sentence above should read:

I went through an upgrade process with a copy of our production testlink DB that was at 1.9.3 and followed the steps for upgrade to 1.9.4 (with some clean-up to the script for MSSQL) and testlink login screen came right up.
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: TestLink Install Guide for Windows 2008 R2 w/ IIS

Post by fman »

@jack090
thanks for your help
Post Reply