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"
Instalação/Configuração
Índice
Dependências
Requerimentos para as plataformas Win32.
A extensão requer que as ferramentas de cliente do MS SQL sejam instaladas no sistema onde o PHP esta instalado. As ferramentas de cliene podem ser instaladas apartir do CD do MS SQL Server ou copiando ntwdblib.dll de \winnt\system32 da máquina do servidor \winnt\system32 na máquina do PHP. Copiar ntwdblib.dll irá somente prover acesso através de named pipes. Configuração do cliente irá requerer a instalação de todas as ferramentas.
Requerimentos para as plataformas Unix/Linux.
Para usar a extensão MSSQL no Unix/Linux, você primeiramente precisa compilar e instalar a biblioteca FreeTDS. Código fonte e instruções de instalação estão disponíveis na página de FreeTDS: » http://www.freetds.org/
Nota: No Windows, é usado a DBLIB da Microsoft. Funções que retornam um nome de coluna estão baseadas na função dbcolname() na DBLIB. DBLIB foi desenvolvida para o SQL Server 6.x aonde o limite do identificador é 30. Por esta razão, o limite de tamanho da coluna é 30 caracteres. Nas plataformas onde o FreeTDS é usado(Linux), isto não é um problema.
Instalação/Configuração
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).
