Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
I found this post at msdn: "PHP dropped support in 5.3 for the mssql.dll...it sucked anyway. However, you can use Microsoft's driver 1.1 for the 5.3 php build, but you will have to modify your php files to reference the sqlsrv_ function set instead of mssql_." –  JYelton Mar 22 '11 at 21:55

1 Answer 1

up vote 1 down vote accepted

According to a forum post at wampserver.com:

php used in wamp is vc6

wamp 2.0 is not built in VC++ at all

Looking in the wamp\bin\php\php5.3.0\ folder, I found php5ts.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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.