Which PHP extension should I use with SQL Server 2000?

Asked

Viewed 251 times

3

I am trying to connect to SQL Server 2000 database using PHP PDO SQLSRV, but when accessing index return me the catch() with the following error

SQLSTATE[08001]: [Microsoft][SQL Server Native Client 11.0]SQL Server Native Client 11.0 does not support Connections to SQL Server 2000 or earlier versions.

Any hint as to how I can solve?

  • See if this helps you.

  • 1

    Which version of php you’re using?

  • 5.4.8 the version of my PHP

  • 1

    One attempt to remedy is to use odbc driver for PDO.

  • I’ll try to solve with odbc driver

1 answer

2


Unfortunately this version of SQL Server Native Client does not work with SQL. Server 2000.

You need to use Microsoft Drivers 2.0 for PHP for SQL Server in this case and Microsoft SQL Server 2008 R2 Native Client.

However, to use version 2.0, you need to use maximum PHP 5.3. Use this table as a comparison:

| Versão do Driver | Versão do PHP  | Versão SQL Server |
|------------------|----------------|-------------------|
| 3.2              | 5.4, 5.5 e 5.6 | 2005+             |
| 3.1              | 5.4 e 5.5      | 2005+             |
| 3                | 5.3 e 5.4      | 2005+             |
| 2                | 5.2 e 5.3      | 2000+             |

More information here.

  • And for SQL Server 2008 ? not listed on the microsoft website

  • 1

    I decided using the link you sent, thanks, anything I open another question.

  • So it’s 2005 forward :) 2008 should work

Browser other questions tagged

You are not signed in. Login or sign up in order to post.