On 2010-01-21 09:36:21 Álvaro González asked:
SQL Server Driver for PHP under Windows 2000 Server SP4
I need to install a demo of a PHP application that makes use of the SQL Server Driver for PHP. The server is an old machine that runs Windows 2000 Server SP4. I’ve installed the whole stack without problems:
- Apache 2.2.14
- PHP 5.3.1
- SQL Server 2005 Express Edition
- SQL Server Management Studio Express
But there’s a component that’s not working as expected: the SQL Server Native Client. I get an error message as soon as I call sqlsrv_connect(). I’ve found four different releases and none works:
If I don’t install it or I install the 2005 version:
- SQLSTATE: IMSSP
- code: -49
- message: The SQL Server Driver for PHP requires the SQL Server 2008 Native Client ODBC Driver (SP1 or later) to communicate with SQL Server. That ODBC Driver is not currently installed. Access the following URL to download the SQL Server 2008 Native Client ODBC driver for x86: http://go.microsoft.com/fwlink/?LinkId=163712
If I install the 2008 version:
- SQLSTATE: IM003
- code: 160
- message: Specified driver could not be loaded due to system error 127 (SQL Server Native Client 10.0).
The system requirements for SQL Server Driver for PHP 1.1 include Windows 2000 Service Pack 4. However, the system requirements for SQL Server 2008 Native Client mentions Windows Server 2003 Service Pack 2 or greater.
Any idea?
He received 2 answers
eventually accepting:
I’ve got further information from Serban Iliescu in the official forum:
Upon further investigation, I found
that SQL Server Native Client 2008
(a.k.a. SNAC 10) will not load on
Windows 2000 because some dll
dependencies are not satisfied by the
operating system. There is defect
currently logged against SNAC 10 to
resolve this issue by gracefully
downgrading, but that defect is yet to
be addressed. Meanwhile you can try
the previous version of the PHP driver
(i.e. version 1.0) that is linked to
SNAC 9 (SQL Server Native Client 2005)
and SNAC 9 is supposed to work on
Windows 9.To sum up:
- SQL Server Driver for PHP 1.1 requires SQL Server Native Client 2008
- SQL Server Native Client 2008 has a known bug and won’t load under Windows 2000
- SQL Server Native Client 2005 works fine under Windows 2000
- SQL Server Driver for PHP 1.0 only requires SQL Server Native Client 2005
I installed the older version of the PHP driver together with the 2005 version of the Native Client. I also had to downgrade PHP from 5.3 to 5.2.
My application seems to work with the old version of the PHP driver. So the demo is up and running at last.
Of course, you should really check out the original question.
The post SQL Server Driver for PHP under Windows 2000 Server SP4 [ANSWERED] appeared first on Tech ABC to XYZ.