Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004898TestLinkDatabase MS-SQLpublic2012-01-29 10:462012-09-01 19:56
Reporterfman 
Assigned Tofman 
PrioritynormalSeveritymajorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.9.3 (2011 Q3 - bug fixing) 
Fixed in Version1.9.4 (2012 Q3 - bug fixing) 
Summary0004898: MSSQL - Add support for SQLSRV drivers needed for PHP on WINDOWS version 5.3 and higher
DescriptionFrom PHP MANUAL on mssql functions INTRODUCTION
Introduction
These functions allow you to access MS SQL Server database.

This extension is not available anymore on Windows with PHP 5.3 or later.
SQLSRV, an alternative driver for MS SQL is available from Microsoft: » http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx. [^]


http://www.microsoft.com/en-us/download/details.aspx?id=20098 [^]

CRITICAL
Version 3.0 of the driver requires Microsoft SQL Server 2012 Native Client. You can download Microsoft SQL Server 2012 Native Client from the SQL Server 2012 feature pack page.
TagsNo tags attached.
Database (MySQL,Postgres,etc)MSSQL
Browser
PHP Version5,3 or HIGHER
TestCaseID
QA Team - Task Workflow StatusREADY FOR TESTING
Attached Files

- Relationships

-  Notes
(0016307)
fman (administrator)
2012-01-29 16:22
edited on: 2012-01-29 16:23

CRITIC NOTES:
after some issue with ADODB and info got from Mantisbt site
(4891: Custom fields tables (custom_fields, custom*) Column data type definition differs between mySQL and MSSQL)
In order to use this drivers UPGRADE to LATEST ADODB is a must
(adodb515)

(0016736)
Ksaleki (reporter)
2012-05-21 14:04

would be really great . maybe this will help to fix my issue , too
(0017085)
alpinetester (reporter)
2012-08-13 21:33
edited on: 2012-08-13 21:42

This is an important issue for me, as well. After I look around a bit in the PHP code, I may take a crack at making my local TestLink code work with the new driver (extension=php_sqlsrv_53_nts.dll).

I know for a fact that the existing code has no capability to recognize or use this driver, and it is the only one that PHP 3.5.15 has been able to recognize...(from php_info command): "sqlsrv support enabled"

I found just one incident of this incompatibility, which is the source of the humorously misspelled message "Checking PHP DB extensions Warning!: Your PHP installation don't have the mssql extension mssql- without it is IMPOSSIBLE to use Testlink.Failed!"

This is located in installUtils.php > function check_db_loaded_extension(), approx. line 555, where it looks for the $db_type value in the get_loaded_extensions() array:

function check_db_loaded_extension($db_type)
{
    $ext2search=$db_type;
    $dbType2PhpExtension=array('postgres' => 'pgsql');
    
    if( isset($dbType2PhpExtension[$db_type]) )
    {
      $ext2search=$dbType2PhpExtension[$db_type];
    }
      
    $msg_ko = "<span class='notok'>Failed!</span>";
    $msg_ok = '<span class="ok">OK!</span>';
    $tt=array_flip(get_loaded_extensions());
    
    $errors=0;
    $final_msg = "< br/>Checking PHP DB extensions ";
    
    if( !isset($tt[$ext2search]) )
    {
        $final_msg .= "<span class='notok'>Warning!: Your PHP installation doesn't have the {$db_type} extension {$ext2search}- " .
                      "without it is IMPOSSIBLE to use Testlink.</span>";
        $final_msg .= $msg_ko;
        $errors += 1;





    if( isset($tt["sqlsrv"]) )
    {
        $final_msg .= "< br/>< br/><span class'ok'>BUT!! Your PHP installation DOES have sqlsrv...TestLink must be adapted to use it!</span>";
    }






    }
    else
    {
        $final_msg .= $msg_ok;
    }
    $ret = array ('errors' => $errors,
                  'msg' => $final_msg);
    
    return ($ret);
} //function end


In the function above I have not only corrected some grammar, but also used the isset() function to find "sqlsrv" and print a second message alerting myself to the fact that I DO HAVE the sqlsrv extension.

Now, I hope, it is a matter of time and tracing the code to find all instances where a function from php_mssql is used, along with other hardcoded instances like "array('postgres' => 'pgsql')", in order to enable the new sqlsrv interface.

The final result of this tinkering:

"TestLink 1.9.3 (Prague) TestLink 1.9.3 (Prague) - New installation
  

Checking PHP DB extensions Warning!: Your PHP installation doesn't have the mssql extension mssql- without it is IMPOSSIBLE to use Testlink.Failed!

BUT!! Your PHP installation DOES have sqlsrv...TestLink must be adapted to use it!
"

(0017086)
fman (administrator)
2012-08-14 08:24

OK thanks for your help.
My plans are to work on this during next weeks => stay tunned
(0017148)
fman (administrator)
2012-08-22 16:48

// Faced this problem when testing XAMPP 1.7.7 on Windows 7 with MSSQL 2008 Express
// From PHP MANUAL - reganding mssql_* functions
// These functions allow you to access MS SQL Server database.
// This extension is not available anymore on Windows with PHP 5.3 or later.
// SQLSRV, an alternative driver for MS SQL is available from Microsoft:
// http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx. [^]
//
// PHP_VERSION_ID is available as of PHP 5.2.7
if ( defined('PHP_VERSION_ID') && PHP_VERSION_ID >= 50300)
{
    $adodb_driver = 'mssqlnative';
}
(0017149)
fman (administrator)
2012-08-22 17:23

FROM PHP MANUAL
Installation

The SQLSRV extension is enabled by adding appropriate DLL file to your PHP extension directory and the corresponding entry to the php.ini file. The SQLSRV download comes 8 driver files, four of which are for PDO support. If you are running non-thread-safe PHP (PHP 5.3), use the php_sqlsrv_53_nts.dll file. (You should use a non-thread-safe version if you are using IIS as your web server). If you are running thread-safe PHP, use the php_sqlsrv_53_ts.dll file. Similarly for PHP 5.4, use the php_sqlsrv_54_nts.dll or php_sqlsrv_54_ts.dll depending on whether your PHP installation is non-thread-safe or thread-safe.

The most recent version of the driver is available for download here: » SQLSRV 3.0 download. If you need support for PHP 5.2 and/or PHP compiled with VC6, use the 2.0 release of the driver: » SQLSRV 2.0 download.

For more information about SQLSRV requirements, see » SQLSRV System Requirements.

The SQLSRV extension is only compatible with PHP running on Windows.
(0017150)
fman (administrator)
2012-08-22 17:25

Trying to install on Windows 7 with MSSQL 2008Express

Please check the database login details and try again.
Database Error Message: SQLState: IMSSP Error Code: -49 Message: This extension requires the Microsoft SQL Server 2012 Native Client. Access the following URL to download the Microsoft SQL Server 2012 Native Client ODBC driver for x86: http://go.microsoft.com/fwlink/?LinkId=163712 [^] SQLState: IM002 Error Code: 0 Message: [Microsoft][Driver Manager ODBC] Nome origine dati non trovato e driver predefinito non specificato. SQLState: IMSSP Error Code: -49 Message: This extension requires the Microsoft SQL Server 2012 Native Client. Access the following URL to download the Microsoft SQL Server 2012 Native Client ODBC driver for x86: http://go.microsoft.com/fwlink/?LinkId=163712 [^] SQLState: IM002 Error Code: 0 Message: [Microsoft][Driver Manager ODBC] Nome origine dati non trovato e driver predefinito non specificato. SQLState: IMSSP Error Code: -49 Message: This extension requires the Microsoft SQL Server 2012 Native Client. Access the following URL to download the Microsoft SQL Server 2012 Native Client ODBC driver for x86: http://go.microsoft.com/fwlink/?LinkId=163712 [^] SQLState: IM002 Error Code: 0 Message: [Microsoft][Driver Manager ODBC] Nome origine dati non trovato e driver predefinito non specificato.
(0017151)
fman (administrator)
2012-08-22 17:40

MICROSOFT SQL SERVER CONNECTIVITY FEATURE PACK COMPONENTS



    Microsoft® SQL Server® 2012 Native Client
        Microsoft SQL Server Native Client (SQL Server Native Client) is a single dynamic-link library (DLL) containing both the SQL OLE DB provider and SQL ODBC driver. It contains run-time support for applications using native-code APIs (ODBC, OLE DB and ADO) to connect to Microsoft SQL Server 2005, 2008, 2008 R2, and SQL Server 2012. SQL Server Native Client should be used to create new applications or enhance existing applications that need to take advantage of new SQL Server 2012 features. This redistributable installer for SQL Server Native Client installs the client components needed during run time to take advantage of new SQL Server code name ‘Denali’ features, and optionally installs the header files needed to develop an application that uses the SQL Server Native Client API.

            X86 Package (sqlncli.msi)
            X64 Package (sqlncli.msi)
(0017152)
fman (administrator)
2012-08-23 07:36

Fresh install tested OK on:
Windows 7 Professional Service Pack 1 64bits
XAMPP 1.8.0 LITE (PHP 5.4)
Using Microsoft SQL Server Driver for PHP (SQLSRV30.EXE)

Version 3.0 of the driver requires Microsoft SQL Server 2012 Native Client. You can download Microsoft SQL Server 2012 Native Client from the SQL Server 2012 feature pack page.
(0017153)
fman (administrator)
2012-08-23 08:49

http://gitorious.org/testlink-ga/testlink-code/commit/01fb2a3e2ea91fe0cf2339b79fdcdf8d761ec265 [^]
(0017230)
fman (administrator)
2012-09-01 19:56

1.9.4 released

- Issue History
Date Modified Username Field Change
2012-01-29 10:46 fman New Issue
2012-01-29 10:46 fman Status new => assigned
2012-01-29 10:46 fman Assigned To => fman
2012-01-29 11:42 fman Summary Add support for SQLSRV drivers need for PHP 5.3 and higher => MSSQL - Add support for SQLSRV drivers need for PHP 5.3 and higher
2012-01-29 14:55 fman Summary MSSQL - Add support for SQLSRV drivers need for PHP 5.3 and higher => MSSQL - Add support for SQLSRV drivers needed for PHP on WINDOWS version 5.3 and higher
2012-01-29 16:20 fman Severity minor => major
2012-01-29 16:22 fman Note Added: 0016307
2012-01-29 16:23 fman Note Edited: 0016307 View Revisions
2012-04-14 17:46 fman Status assigned => work in progress
2012-05-21 14:04 Ksaleki Note Added: 0016736
2012-08-13 21:33 alpinetester Note Added: 0017085
2012-08-13 21:38 alpinetester Note Edited: 0017085 View Revisions
2012-08-13 21:40 alpinetester Note Edited: 0017085 View Revisions
2012-08-13 21:40 alpinetester Note Edited: 0017085 View Revisions
2012-08-13 21:41 alpinetester Note Edited: 0017085 View Revisions
2012-08-13 21:42 alpinetester Note Edited: 0017085 View Revisions
2012-08-14 08:24 fman Note Added: 0017086
2012-08-22 16:48 fman Note Added: 0017148
2012-08-22 16:52 fman Task Workflow Status => TBD
2012-08-22 16:52 fman Description Updated View Revisions
2012-08-22 17:23 fman Note Added: 0017149
2012-08-22 17:25 fman Note Added: 0017150
2012-08-22 17:40 fman Note Added: 0017151
2012-08-22 17:41 fman Description Updated View Revisions
2012-08-23 07:36 fman Note Added: 0017152
2012-08-23 08:49 fman Note Added: 0017153
2012-08-23 08:49 fman Status work in progress => assigned
2012-08-23 08:49 fman Task Workflow Status TBD => READY FOR TESTING
2012-08-23 08:49 fman Status assigned => resolved
2012-08-23 08:49 fman Fixed in Version => 1.9.4 (2012 Q3 - bug fixing)
2012-08-23 08:49 fman Resolution open => fixed
2012-09-01 19:56 fman Note Added: 0017230
2012-09-01 19:56 fman Status resolved => closed



Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker