I'm trying to run mssql
driver for PHP, but something goes wrong.
I managed to get the right drivers for mssql, then added the extensions in php.ini, but PHP is still running "--without-mssql" "--without-pdo-mssql"
.
I'm running PHP 5.4 under Apache 2.2 on Windows XP SP3.
How to start the mssql drivers?

- 312,688
- 75
- 539
- 559

- 141
- 2
- 3
- 9
-
Please go through [How to get MS SQL work with PHP 5.3](http://stackoverflow.com/questions/7402713/how-to-get-mssql-work-with-php-5-3) and report back. Also make sure you are editing the right php.ini (listed in phpinfo) and don't forget to restart the server afterwards. Thanks. – Gordon Jul 09 '13 at 07:32
-
This was done. `extension=php_sqlsrv_54_ts.dll extension=php_pdo_sqlsrv_54_ts.dll` apache starts PHP normal, no errors, no warnings and without mssql as phpinfo says. – David White Jul 09 '13 at 07:36
3 Answers
I've just had the same problem, for me I needed to use a different version of the driver.
I was using:
extension=php_sqlsrv_53_ts.dll
Which gave me the following error in PHP:
[28-Nov-2013 10:58:47 UTC] PHP Warning: PHP Startup: sqlsrv: Unable to initialize module Module compiled with module API=20090626 PHP compiled with module API
The solution:
extension=php_sqlsrv_54_ts.dll
Download from: http://www.microsoft.com/en-us/download/details.aspx?id=20098

- 4,121
- 4
- 19
- 29
See this answer: https://stackoverflow.com/a/25199324/1847383. If you use PHP as an Apache module, use the thread safe version.
I have found a great tutorial and explanation on this website:
http://bendustries.co/wp/setting-up-xampp-to-work-with-mssql/
All you need to do is download from here : https://www.microsoft.com/en-us/download/details.aspx?id=20098
two files called:
- php_pdo_sqlsrv.dll
- php_pdo_sqlsrv.dll
And place then inside the php\ext
folder.
Then you need to add those two lines under "Dynamic Extensions"
extension=php_sqlsrv.dll
extension=php_pdo_sqlsrv.dll
Save your php.ini file and restart apache, This process worked for me on win7 after I tried several other methods !

- 1
- 1

- 5,073
- 2
- 40
- 58