Bienvenue, Invité
Nom d'utilisateur : Mot de passe : Se souvenir de moi

SUJET : Howto connect to a SQL Server 2000 database

Howto connect to a SQL Server 2000 database il y a 6 mois 4 jours #100719

  • Carlitros
  • Portrait de Carlitros
  • Hors ligne
  • Fresh Lemon
  • Messages : 2
  • Karma: 0
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.
Dernière édition: il y a 6 mois 4 jours par Carlitros.
L'administrateur a désactivé l'accès en écriture pour le public.

Howto connect to a SQL Server 2000 database il y a 6 mois 4 jours #100722

  • c_schmitz
  • Portrait de c_schmitz
  • Hors ligne
  • LimeSurvey Team
  • Messages : 719
  • Remerciements reçus 91
  • Karma: 83
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.
Support us, too. Donate to the LimeSurvey project and help keep us going!
L'administrateur a désactivé l'accès en écriture pour le public.

Howto connect to a SQL Server 2000 database il y a 6 mois 4 jours #100724

  • Carlitros
  • Portrait de Carlitros
  • Hors ligne
  • Fresh Lemon
  • Messages : 2
  • Karma: 0
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.
L'administrateur a désactivé l'accès en écriture pour le public.
Modérateurs: ITEd
Temps de génération de la page : 0.118 secondes
Donation Image