Install php_mssql on PHP

In fact installing the mssql modules in php is easy, we may get  errors sometimes. In phpinfo() it may be shown that the  php mssql module is installed. But when we tried to connect to an SQL server through php script we will get error ” sorry something went wrong”

IF we need to install php mssql module it requires two DLLs php_mssql.dll and ntwdblib.dll. If these DLLs are not present in your php installation  folder you need to download it.  Copy these DLLs to   php extension folder also copy ntwdblib.dll to system32 folder . Once you have done these, simply enable the module in php.ini file by uncommenting the line ;extension=php_mssql.dll.  The line should be looked like

extension=php_mssql.dll

If there is no such line in php.ini, just add the above line just below the ” Dynamic Extensions ”

Once you did it, just restart apache server and it will be fine.

Common Error:  the module  mssql is shown in phpinfo, but mssql connections are not working

Solution :  This is due to the version of ntwdblib.dll. You can download the latest version of this dll

(http://www.dlldll.com/ntwdblib.dll_download.html)

You can leave a response, or trackback from your own site.

5 Responses to “Install php_mssql on PHP”

  1. This stupid official files & docs never work !!

    this is helpful….Thanks much man… :-)

  2. Brian Swan says:

    Many of the problems that occur with the mssql driver for SQL Server can be avoided by using the driver that is produced by Microsoft (which is supported by Microsoft and is commonly called the sqlsrv driver, for the prefix used in the API). The download for the driver is here:

    http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=ccdf728b-1ea0-48a8-a84a-5052214caad9

    The source code is available here: http://www.codeplex.com/SQLSRVPHP

    -Brian

  3. Aneesh Aneesh says:

    Thanks Brian.. it will definitely help us

  4. Hi Brian,

    Actually I have first tried this “SQL Server Driver for PHP 1.1 – October 2009″ but that didn’t work without this ntwdblib.dll version 2000.80.194.0

    Thanks

    Sathyan

  5. I certainly like your web site layout it’s so clean, simple to read.

Leave a Reply

Subscribe without commenting


Fatal error: Call to undefined function wp_list_addonn() in /home/aneesh/public_html/wp-content/themes/Grante/sidebar.php on line 106