jreed121
jreed121

Reputation: 2097

SQL Server 2005 php 5.2

I'm having a really difficult time trying to get php to connect to SQL Server 2005. It seems like no matter what I do or what page I visit, I either get the wrong extension/driver or find a dead link. The most recent attempt was php_sqlsrv_52_ts_vc6.dll which apparently doesn't support anything prior to 2008.

After over two days of searching, I'm lost, and upgrading either php or SQL Server is not an option unfortunately...

EDIT: Everything is running on IIS 6 - Server 2003 (Same box).

Upvotes: 1

Views: 1242

Answers (1)

dbrumann
dbrumann

Reputation: 17166

Your problem probably is that you are running IIS6, which will require the nts-version.

Additionally you have to install the SQL Server Native Client 2008, which is a bit misleading as it will still work with MSSQL 2005.

It should go something like this:

  1. Download SQL Server Driver 2.0 for PHP
  2. Place the dll (5.2 nts) into PHP's ext-folder
  3. Enable the extension in the php.ini extension=sqlsrv*.dll
  4. Install a recent version of Microsoft's Native Client (e.g. from the SQL Server 2012 Feature Pack)
  5. Restart your web server.

I use Apache, so I'm not sure if there is anything else to do on IIS or whether some of the steps differ, but this is how I got it working.

Upvotes: 1

Related Questions