Skip to content
Advertisement

php starup sqlsrv unable to initialize module

I am trying to connect MSSQL to PHP. i am following this tutorial. Anyway after i added the dll files as described in that tutorial, i get the following warning. How can i solve this ?

php starup sqlsrv unable to initialize module module compiled with module api=20090626 php compiled with module api=20020520 these options need to match

note:i have gone through this post but none helped.

Advertisement

Answer

Looks like you’ve tried to install the sqlsrv extension for php 5.3 on a php 5.2 system.

Either run <?php phpinfo(); ?> and look for the php version and look for the following entries:

  • PHP Version
  • Thread Safety

pick the appropriate .dll from the sqlsrv driver: the version number must match and if thread safety is enabled pick the ts version, if not pick the nts version.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement