Newbee needs to know how to connect from linux php to mssql with php 7


#1

How do I connect to mssql db from php 7 program on a Fedora 28 box?
The following is the response from php -v:

PHP 7.2.4 (cli) (built: Mar 27 2018 13:10:41) ( NTS )
Copyright © 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright © 1998-2018 Zend Technologies

It appears Zend + PDO is the route since php-mssql is deprecated, but I cannot find much information.
A simple working example would be great (or a link to one).
If a driver is required, which one? where do I get it? how do I install it?


#2

PDO-MSSQL is highly experimental, and its usage is discouraged.


#3

I created a blogpost in 2013 about it, not sure if it still relevant https://samsonasik.wordpress.com/2013/03/08/zend-framework-2-working-with-sql-server/


#4

is there a recommended method ?