I am using WampServer 2.0i (PHP 5.3.0 and Apache 2.2.11) on Windows* and would like to connect to SQL Server 2008. I downloaded the SQL Server Driver for PHP 1.1 from Microsoft which provides an assortment of driver DLL's.
The chart I am provided with in the help files is:
Driver file PHP version Thread safe? Use with PHP .dll
=========== =========== ============ =================
php_sqlsrv_53_nts_vc6.dll 5.3 no php5.dll
php_sqlsrv_53_nts_vc9.dll 5.3 no php5.dll
php_sqlsrv_53_ts_vc6.dll 5.3 yes php5ts.dll
php_sqlsrv_53_ts_vc9.dll 5.3 yes php5ts.dll
Further instructions say:
If the name of the driver file contains "vc9", it should be used with a PHP version compiled with Visual C++ 9.0. If the name of the driver file contains "vc6", it should be used with a PHP version compiled with Visual C++ 6.0.
How am I supposed to know which version of Visual C++ was used to compile PHP? I realize on a Unix distro I'd have more intimate knowledge of this because I'd likely be installing PHP and Apache separately and compiling them (it's been ages since I've done so).
Should I even try to install this driver dll, or is there some better way to get PHP to talk to SQL Server?
*Windows 7 Professional 64-bit; SQL Server 2008; WampServer 2.0i
According to a forum post at wampserver.com:
Looking in the
wamp\bin\php\php5.3.0\
folder, I foundphp5ts.dll
so I will assume I need to use the thread safe version.So, if I am right, the answer is to use the
php_sqlsrv_53_ts_vc6.dll
driver.Also I'll be attempting to modify the
wamp\wampmanager.ini
file to have the dll show up in the extension list from the wampserver tray icon menu.