How to enable php_mssql.dll extension in xampp 1.8.x

I am using xampp-win32-1.8.3-1-VC11-installer and I turned on the php_mssql.dll extension in php.ini by deleting ;

I will php_mssql.dll to xampp\php\ext
and ntwdblib.dll to xampp\apache\bin

I got 2 files above in the old xampp version.

But when I run my apache in xampp, I get

enter image description here

enter image description here

How to fix it thanks

+6
source share
2 answers

Announced from php website http://php.net/manual/en/intro.mssql.php

These functions allow you to access the MS SQL Server database.

This extension is no longer available on Windows with PHP 5.3 or later.

SQLSRV, an alternative extension for connecting MS SQL is available at Microsoft: ยป http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx.

Since XAMPP 1.8.0 its extension is PHP 5.4.4 and php_mssql.dll is no longer available for Windows with PHP 5.3 or later. Thus, you cannot use this library for your new XAMPP, although you get it from your old XAMPP. You must use an alternative extension to connect to the MS SQL Server database, such as SQLSRV.

See also:

  • http://php.net/manual/en/intro.mssql.php
  • http://stackoverflow.com/questions/7402713/how-to-get-mssql-work-with-php-5-3

Your php version from XAMPP 1.8.3 is PHP 5.5.15, so you should use "php_sqlsrv_55_nts.dll" or "php_sqlsrv_55_ts.dll". These files can be downloaded from http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=20098 `.

Note: see also the information in the "Details" section to help you select the file you should download.

This link is for documentation on sqlsrv library code http://php.net/manual/en/book.sqlsrv.php

+1
source

Windows PHP extensions are neither advanced nor backward compatible between second level PHP versions. This means that you cannot use the PHP 5.3 extension in PHP 5.4 and vice versa.

When you use XAMPP 1.8.3, and this is one of the first PHP packages with VC11-PHP5.5 builds, you will need to find a VC11-PHP5.5 compatible extension elsewhere. I just checked out another WAMP package called EasyPHP, but they do not ship the MS SQL extension with their package VC11-PHP5.5.

However, I cannot help finding a compatible extension.

You can also build the extension yourself if this is an option for you.

0
source

Source: https://habr.com/ru/post/958856/


All Articles