# how to install "pdo_sqlsrv" pkg in freebsd



## m abdul aziz (Feb 21, 2020)

hello there,
I recently installed apache24, php72 on a new jail.. my web application accesses remote mssql db in my local network.. can some one please suggest me how can i get php extension "pdo_sqlsrv" pkg  


Thanks & Regards,
Abdul Aziz


----------



## Emrion (Feb 21, 2020)

Hi,


```
$ pkg search pdo_sql
php71-pdo_sqlite-7.1.29        The pdo_sqlite shared extension for php
php72-pdo_sqlite-7.2.18        The pdo_sqlite shared extension for php
php73-pdo_sqlite-7.3.5         The pdo_sqlite shared extension for php
$
```

Is it what you looking for?


----------



## Zvoni (Feb 21, 2020)

Emrion said:


> Hi,
> 
> 
> ```
> ...


Uh...... the OP specifically mentioned "remote mssql".
What's that got to do with sqlite?
As for the OP's Problem: he probably needs FreeTDS:








						Login Incorrect when connecting from FreeBSD to SQL Server 2008 via FreeTDS
					

Scenario: I wanted to connect to an SQL server 2008 from a FreeBSD 8.2 machine using PHP5.3 and FreeTDS. We have a similar set up on another server running FreeBSD 7.2 with PHP 5.2 . This is still …



					www.jordansphere.co.uk


----------



## m abdul aziz (Feb 22, 2020)

Zvoni said:


> Uh...... the OP specifically mentioned "remote mssql".
> What's that got to do with sqlite?
> As for the OP's Problem: he probably needs FreeTDS:
> 
> ...




thanks for the suggesion .. i was not aware of FreeTDS.... I just created a vm with ubuntu as a temporary solution for my my web app to run . i will try freeTDS


----------



## Quip (Feb 25, 2020)

*PDO_sqlsrv* is not available for FreeBSD AFAIK. This PECL extension depends on some MS libraries which are provided for Windows and Linux but not for FreeBSD.
I tried to build PDO_sqlsrv for PHP 7.1 about a year ago.

If you need to access *MSSQL* you can build *php72-pdo_dblib* from ports and enable support for MSSQL






						FreshPorts -- databases/php72-pdo_dblib: The pdo_dblib shared extension for php
					

PHP, which stands for "PHP: Hypertext Preprocessor" is a widely-used Open Source general-purpose scripting language that is especially suited for Web development and can be embedded into HTML.  Its syntax draws upon C, Java, and Perl, and is easy to learn.  The main goal of the language is to...




					www.freshports.org
				




The prebuilt package does not have it enabled.


----------

