Microsoft have provided a PHP driver for SQL Server 2005.
At the time of this note, the link to it is: http://msdn.microsoft.com/en-us/library/cc296221.aspx
If that doesn't work, search MSDN for "SQL Server 2005 Driver for PHP"
Installation/Configuration
Sommaire
Pré-requis
Requis pour les plates-formes Windows
Vous avez besoin d'un client MS SQL Client Tools sur votre système, accessible à PHP. Les Client Tools peuvent être installés depuis le CD MS SQL Server CD ou en copiant ntwdblib.dll depuis le dossier \winnt\system32 du serveur MS SQL vers \winnt\system32 sur le serveur PHP. Copier ntwdblib.dll ne fera que fournir le moyen d'accès. La configuration du client requiert l'installation des autres outils.
Prérequis pour les plates-formes Unix/Linux.
Pour utiliser l'extension MS SQL sur Unix/Linux, vous devez commencer par compiler et installer la bibliothèque FreeTDS. Le code source et les instructions d'installation sont disponibles sur le site de FreeTDS : » http://www.freetds.org/
Note: Sur Windows, la librairie DBLIB de Microsoft est utilisée. Les fonctions qui retournent les noms de colonnes sont basées sur la fonction dbcolname() de DBLIB. DBLIB a été développée pour MS SQL Server 6.x où la longueur maximale de l'identifiant est 30. Pour cette raison, la longueur maximale des colonnes est 30. Sur les plates-formes où FreeTDS est utilisé (Linux), il n'y pas ce problème.
Installation/Configuration
24-Sep-2008 12:49
18-Jun-2008 10:55
I was having a difficult time getting four Windows 2003 Servers to connect to an MSSQL database with PHP 5.2.5 and IIS after already getting one such server to connect with no problems. I even copied the entire php directory and dlls to the other servers exactly as they were on the working server but continually got "Unable to connect to server" errors. The fix was to delete the ntwdblib.dll from the PHP directory. It was already in the C:\windows\system32 directory and this did not cause a problem on the first server but did on all the others.
27-May-2008 07:06
The 30-character limitation does not apply to the FreeTDS db-lib implementation. FreeTDS returns column names of any length supported by the server (and protocol).
