Xammp does not keep track of the Dlls needed to connect to SQL Server, you need to manually download and copy to your PHP extensions folder.
You can download the latest versions of driver here.
This file is a self-extractor that will extract the Dlls to the directory you choose.
Once done, you need to choose the proper DLL and copy to the folder ext
of PHP. This MSDN page indicates which DLL you should use according to the PHP version.
XAMPP comes with the version Thread Safety (TS) from PHP. Copy to directory xampp\php\ext
a dll php_sqlsrv_XX_ts.dll
, where XX
matches your PHP version.
Finally, in the configuration file include the line referring to DLL.
extension=php_sqlsrv_XX_ts.dll
Or if you want to use SQL Server with PDO:
extension=php_pdo_sqlsrv_XX_ts.dll
Obs.: The latest official version of drivers SQL Server supports up to PHP 5.4.
If you are using PHP 5.5 or higher, you can turn to a built unofficial while Microsoft does not release the new official version and vote to prioritize the launch of the official compatible version.
Update: The driver official has been updated and supports up to the latest stable version of PHP (5.6)
@bigown believed that the old title was more descriptive. By default php did not include the dlls for connection to SQL Server.
– gmsantos
@gmsantos is not easy to find a good title for this "question". But the previous title does not describe any question, doubt or problem. It essentially says which technologies are used, which is a function of tags. In fact, I’m missing a piece of information.
– Maniero
@Alexander, what step by step you have followed ?
– gmsantos
Title I suggest:
php startup sqlsrv unable to initialize module
– Zuul
In the
phpinfo()
the itemThread Safety
is as?– rray
The
API=20121212
corresponds to PHP 5.5. The error you have is because you tried to install the extensionsqlsrv
for a version of PHP that is not the one you have installed...– Zuul
Which version of Xampp and php ?
– gmsantos
@gmsantos PHP version is PHP Version 5.3.3-7+squeeze19 Xampp version is 1.8.3-5-VC11
– Alessandro
Thread Safety enabled
– Alessandro
possible duplicate of Pdo drivers for sql server
– gmsantos