I'm trying to connect to a MSSQL DB and i've followed the steps suggested by others (copy the file php_mssql.dll into the php directoy and change the extension dir in the php.ini to point to c:\php), but i still continue getting the following error:

unknown(): unable to load dynamic library c:\php\php_mssql.dll. Can't find the specified module.

Anybody can tell me if I can connect directly or i must use ODBC connection? Help me.

    a month later

    I had MAJOR issues getting this to work.

    You need to
    1) Place your dll in a particular location
    2) uncomment

    extension=php_mssql.dll

    3) set your extension_dir in php.ini
    ; Directory in which the loadable extensions (modules) reside.
    extension_dir = "C:\Inetpub\Scripts\Php_4.3.4\extensions

    winblows isn't finding your dll file.

      OK, I found the document I have written on how to do this:

      SETTING UP PHP_4.3.4 AND MSSQL WITH IIS
      1) Download the PHP 4.3.4 Installer & the binary distribution package for Windows.
      2) Make sure you have IIS 5 installed. You can install this with the CD using: Start..Control Panel..Add/Remove Software..Windows Components..IIS
      3) Install PHP to "C:\Inetpub\Scripts\php_4.3.4"
      4) Create a dir called extensions (i.e. “C:\Inetpub\Scripts\php_4.3.4\extensions”)
      5) Copy php_mssql.dll to C:\Inetpub\Scripts\php_4.3.4\extensions
      6) Copy ntwdblib.dll to C:\WINNT\System32
      7) Open c:\winnt\php.ini in an editor and change extension_dir to: “C:\Inetpub\Scripts\php_4.3.4\extensions” (with quotes) (or whereever your php_mssql.dll is located)
      8) Enable extension php_mysql by undocumenting the line extension=phpmssql.dll
      9) Start Internet Services Manager - Start..Programs..Administrative Tools..Internet Services Manager
      10) Test it by creating a file phpinfo.php in wwwroot and put in it this line:
      <? phpinfo(); ?>
      Goto http://127.0.0.1/wwwroot/phpinfo.php.
      If you don't see the phpinfo page, there is an error…. Try again.
      NOTE: You may need to grant execute permissions to the scripts directory and subdirectories.

        Write a Reply...