Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008280TestLinkInstallerpublic2018-06-04 14:512018-06-16 17:52
ReporterabIng 
Assigned Tofman 
PrioritynormalSeverityblockReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSwindowsOS Version
Product Version1.9.17 (2018 Q1) 
Fixed in Version1.9.18 (2018 Q3) 
Summary0008280: Installation script fails (MS SQL used)
DescriptionInstallation fails. Database is created, but tables are not created.
The log file userlog1.log (attached) contains error messages:

[<<][5b1549d16cd56346500373][DEFAULT][/testlink-1.9.17/install/installCheck.php][18/Jun/4 14:16:49][18/Jun/4 14:16:49][took 0.095 secs]
    [18/Jun/4 14:19:14][WARNING][<nosession>][GUI]
        E_WARNING
sqlsrv_free_stmt() expects parameter 1 to be resource, string given - in D:\Web\testlink-1.9.17\install\installUtils.php - Line 149
    [18/Jun/4 14:19:14][WARNING][<nosession>][GUI]
        E_NOTICE
Undefined index: LOGINNAME - in D:\Web\testlink-1.9.17\install\installUtils.php - Line 169
    [18/Jun/4 14:19:14][WARNING][<nosession>][GUI]
        E_NOTICE
Undefined index: LOGINNAME - in D:\Web\testlink-1.9.17\install\installUtils.php - Line 169
    [18/Jun/4 14:19:14][WARNING][<nosession>][GUI]
        E_NOTICE
...
Steps To ReproduceTo make sure that the problem is in testlink and not in my configuration I performed the installation of 1.9.14 and 1.9.17 following the same procedure.
The first on is OK, and the second one fails.

For 1.9.14 I entered the data:
DB_HOST - COQLSQLIN4
DB_NAME - CODBTLK_14
DB_USER - couatlk
See the screen copy tl14-1.png.
The result is OK, see tl14-2.png.
Database is created, all the tables are there, testlink is operational.

Then, I execute the same procedure for 1.9.17, see tl17-1.png:
DB_HOST - COQLSQLIN4
DB_NAME - CODBTLK_17
DB_USER - couatlk

It fails, see tl17-2.png:
- The database renamed to CODBTLK17 (underscore removed)
- Page finishes after 'Creating databseā€¦'
- Database is created, but without tables
- userlog1.log (attached) contains errors

I tried to use database name without underscore (testlink) - the result is the same: database created, but not tables
TagsNo tags attached.
Database (MySQL,Postgres,etc)MS SQL
Browser
PHP Version
TestCaseID
QA Team - Task Workflow StatusREADY FOR TESTING
Attached Files7z file icon logpng.7z [^] (163,884 bytes) 2018-06-04 14:51

- Relationships
related to 0007680resolvedfman Bug in MSSQL/testlink_create_tables.sql while creating plugins table  

-  Notes
(0027582)
abIng (reporter)
2018-06-13 12:39

I found the solution.
Several problems are found

1) In file installUtils.php, line 169:
       $users[] = trim($row['LOGINNAME']);
should be
       $users[] = trim($row['LoginName']);

2) I commented out the line 855 of the same file installUtils.php:
       mssql_free_statement($stmt[1]);
Really, the variable $stmt is a string here, not an array.

3) I removed constraints for the first fields of the tables plugins and plugins_configuration in the file sql/mssql/testlink_create_tables.sql, see http://mantis.testlink.org/view.php?id=7680 [^]

After that, the installation script finished OK.
The last problem appeared in 1.9.15; the two first problems appeared in 1.9.17.
(0027591)
fman (administrator)
2018-06-16 17:01

>> should be
>> $users[] = trim($row['LoginName']);

well this can not be fixed this way because probably works only for the Microsoft world

>>2) I commented out the line 855 of the same file installUtils.php:
>> mssql_free_statement($stmt[1]);

this probably depends on changes on MSSQL drivers
(0027597)
fman (administrator)
2018-06-16 17:50

Just for the records:
I've checked installUtils.php for version 1.9.14 and 1.9.17 and there are no differences on the MSSQL parts, then is very strange that you will be able to do installation on 1.9.14 without issues.

- Issue History
Date Modified Username Field Change
2018-06-04 14:51 abIng New Issue
2018-06-04 14:51 abIng File Added: logpng.7z
2018-06-13 12:39 abIng Note Added: 0027582
2018-06-16 17:01 fman Note Added: 0027591
2018-06-16 17:01 fman Relationship added related to 0007680
2018-06-16 17:50 fman Note Added: 0027597
2018-06-16 17:52 fman QA Team - Task Workflow Status => READY FOR TESTING
2018-06-16 17:52 fman Status new => resolved
2018-06-16 17:52 fman Fixed in Version => 1.9.18 (2018 Q3)
2018-06-16 17:52 fman Resolution open => fixed
2018-06-16 17:52 fman Assigned To => fman



Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker