PHP 5.4 and MsSQL on XAMPP

好久不见. 提交于 2019-12-04 22:46:11

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

janhenkes

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:

  1. php_pdo_sqlsrv.dll
  2. 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 !

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!