Check out the LimeSurvey source code on GitHub!

Howto connect to a SQL Server 2000 database

More
3 years 4 months ago - 3 years 4 months ago #100719 by Carlitros
I am having trouble connecting a LimeSurvey instance to a SQL Server database 2000. The LimeSurvey instance was formerly working fine with MySQL, after recompiling my PHP with tha PDO driver library for MySQL.

The LimeSurvey v2.00+ is installed on a machine with Linux CentOS 5.8, PHP 5.3.2 and FreeTDS v1.12. The FreeTDS connection successfully connects to the SQL Server instance.

The error message that I get from LimeSurvey is:
"DbConnection failed to open the DB connection: could not find driver"

My connection line at file application/config/config.php is as follows:

'connectionString' => 'dblib:host=<FreeTDS_connection_name>;dbname=<database_name>',
'username' => '<SQL username>',
'password' => '<password>',

I've discarded using the PDO_SQLSRV driver, as it starts working with SQL Server 2005 ( www.php.net/manual/en/ref.pdo-sqlsrv.php ), and doubt using PDO_DBLIB because of its old and experimental status ( www.php.net/manual/en/ref.pdo-dblib.php ).

1. Can I get LimeSurvey to work directly with my FreeTDS connection?

If not,

2. What is the correct PHP library I should add?

Thank you.
Last Edit: 3 years 4 months ago by Carlitros.

Please Log in to join the conversation.

More
3 years 4 months ago #100722 by c_schmitz
Hello,

Using the pdo_dblib driver is the right choice. Afaik pdo_sqlsrv is not available on Linux, anyway.
During installation just using the IP-address of your MSSQL server as hostname should be fine - no TDS connection name is needed if your TDS version is a pretty much recent one. YOu will need to make sure that your MSSQL server is able to connect on TCP/IP.

Best regards

Carsten Schmitz
LimeSurvey project leader

Please Log in to join the conversation.

More
3 years 4 months ago #100724 by Carlitros
Thank you very much. After recompiling PHP, adding '--with-pdo-dblib=<freeTDS_home_directory>' and modifying the connection file as instructed, LimeSurvey reached the MSSQL 2000 database.

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form